The API allowing to manage Marketplace common functionalities
- Make sure you've installed docker
- Make sure you're using NodeJS version 16
- You can also install nvm in order to switch between different node versions
- Make sure you're using yarn as the package manager
Install all necessary dependencies via:
yarn
Copy the local profile configuration via:
yarn setup:dev
This will leave you with a local.js
file within the config
folder that will be used as the profile configuration.
There are few options while it comes to database setup.
-
Run Database Locally:
- You can setup a elastic search database locally.
- Then update the credentials in your local.js file from previous step as:
elasticsearch: { node: '', prefix: '', auth: { username: 'elastic', password: 'password', } },
- Your onboarding buddy can share a copy of database dump with you for the initial data
-
Run from Docker:
- Make sure you installed docker
- From project root in terminal run
docker-compose up
npm run dev
npm build
- src
- greeting # Domain model, more specifically, an aggregate, where cat is the root aggregate (example endpoint)
- common # Cross-cutting functionality, like guards, middleware or interceptors
- shared # Modules and services that are used shared between services (Elasticsearch service is include here for example)
- config # Configuration per profile
Make sure you have docker running with docker-compose up
yarn setup:dev
yarn test:cov
Start the development server:
yarn setup:dev
yarn dev
Once the development server is up and running run postman tests with:
yarn test:postman
Copyright 2022 Nevermined AG
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.