Setup a new Moleculer project
You will need to have NodeJS installed on your computer.
First install the moleculer-cli tool globally.
npm install -g moleculer-cli
Then initialize a new project based on this template with this command:
moleculer init assemblee-virtuelle/semapps-template-ldp my-project
yes to all questions
? Do you need a local instance of Jena Fuseki (with Docker)? Yes
? Do you need a read-only SPARQL endpoint? Yes
Create 'semapps' folder...
? Would you like to run 'npm install'? Yes
You can now go to the newly-created directory:
Launch your local Jena Fuseki instance
Jena Fuseki is a semantic triple store. It is where your app's data will be stored.
You need docker and docker-compose installed on your machine.
Jena Fuseki is now available at the URL http://localhost:3030.
Please login - By default the login is
admin and the password is also
Please start by create a new dataset and name it
localData (case sensitive)
Your triples will be stored there.
Run Moleculer in dev mode
Your instance of SemApps is available at http://localhost:3000
Testing your LDP server
By default, the LDP service will create a LDP container in the
Post an ActivityStreams Note to this LDP container with a tool like Insomnia, Postman or the RESTClient add-on for Firefox.
POST /resources HTTP/1.1
"name": "Hello World"
/resources LDP container:
GET /resources HTTP/1.1
You should get this result:
"as:name": "Hello World"