This is a Node.js fastify REST API service
- Node.js 18.13.0+ (Install node using nvm only)
- Code editor (vscode)
-
Using es-module
-
Uses pnpm To add a dependency say mongodb, use (Save to dependencies)
pnpm add mongodb
To add a dev dependency say standard, use (Save to devDependencies)
pnpm add -D standard
-
Using fastify cli to run the app and not node, reason being to make use of better error handling capability of fastify
-
Uses mongodb as a primiary database, redis will be introduced.
-
Mongodb will be switched (or made optional) with scylladb (2023 2nd Quarter)
- Create env file and add corresponding values
cp .env.template .env
- Install dependecies
pnpm install
- Start the app
pnpm start
Using swagger docs. Api documentaion is available in /documentation in non production environment. For eg, for accessing documentation in local environment, check http://localhost:3000/documentation