This is the API for the PWA eLogical and only takes REST requests and authenticates client with JWT.
It's build on following components:
- This app is base on Express.
- As the databaase first Azure Cosmos DB has been used and works well. Then switching to MongoDB protocol.
- Mongoose as client for the database (works with Cosmos DB and Monogo).
$ git clone https://github.com/srad/eLogical.API.git
$ cd eLogical.API
$ npm installThese environment variables are used in deployment.
CONNECTION_STRING
PORT
SECRET
NODE_ENVBut the only necessary one is the mongodb CONNECTION_STRING. If you have a MongoDB instance running on your local machine set the environment variable, i.e. in PowerShell:
$env:CONNECTION_STRING="mongodb://localhost:27017/elogical"Run the server:
$ npm start