This api is the backend of the waiter bot system. We have developed this API on top of the express.js framework and MongoDB.
- Versioning
- Tests
- Flexibility
git clone https://github.com/shirlymadushanka/waiterbot-api.git
cd waiterbot-api
npm install1. DB (MongoDB url)
2. SECRET
3. PORT
Also you have to configure aws-s3 bucket and enter below details as env variables.
4. AWS_ACCESS_KEY
5. AWS_SECRET_ACCESS_KEY
6. AWS_BUCKET_NAME
7. S3_BASE_URL
npm startYou made it.💪 Congratulations. 😀🏆
☝️ API runs on port 3000 by default. You can access the root by navigating to the http://localhost:3000/api
Each module has its own test file. That can be found on tests/ directory. Validity of the each responses can be found in utils/Validator.js
npm run testWhen running above test you may have to override the default timeout (5000ms) of the jest.
because testing done using mongo-memory-server.
So in first run it will download the mongodb binaries & it will take some time.
npm run test:coverage