Open source implementation of ETSI ISG CIM standard known as NGSI-LD. An information model, representation format and open API intended to make it easier for end-users, IoT devices, open data sources and 3rd-party applications to exchange information.
- Node.js (https://nodejs.org)
- MongoDB (https://www.mongodb.com)
Before starting the project, you have to install the node dependencies. To do so, run:
npm install
At this step, you will create indexes on collections before starting the server. Before you run the following command, you have to start mongo service and create a database. As described in config file (/config/config.js), we start locally a mongo service and we create 'ngsi_ld_bd' database.
npm run migrate
To start server, run:
npm start
A server will start locally listenning on port 3000. The port number is configured in config file (/config/config.js).
To test that you have correctly installed the server, you can run your first query
curl "http://localhost:3000/subscriptions" -H 'Accept: application/ld+json'
This will return an empty set, since nothing has been created yet. Note that you must specify the accept header, otherwise you get an error. Look here for more information about the API.