- Node version: 18.19.0
- NPM version: 10.2.3
Take reference from .env.example file.
- Create .env.local.dev and .env.local.staging for development.
- Create .env.deploy.production and .env.deploy.staging for serverless deployments.
- MongoDB atlas production database:
- .env.deploy.production (
npm run serverless-deploy-production)
- .env.deploy.production (
- MongoDB atlas staging database:
- .env.deploy.staging (
npm run serverless-deploy-staging) - .env.local.staging (
npm start)
- .env.deploy.staging (
- MongoDB local server:
- .env.local.dev (
npm run dev)
- .env.local.dev (
Run $ npm run dev to run the app in development for local mongodb server.
Run $ npm start to run the app in development for staging mongodb server in mongodb atlas.
Make sure serverless is installed npm i -g serverless and configured serverless config credentials --provider aws --key <Key> --secret <Secret>
To generate keys you can refer here https://www.youtube.com/watch?v=D5_FHbdsjRc
npm run serverless-deploy-staging
npm run serverless-deploy-production
In browser run the following: http://<server_link>/v0/working
ENV=local.docker
ENABLE_DEBUG=true
SERVER_PORT=3002
MONGODB_URL=mongodb://db:27017/shared_storage-storage_service
TOKEN_SECRET=ThisIsASecret
CLOUD_SECRET_KEY=#####
CLOUD_ACCESS_KEY_ID=#####
MULTER_S3_BUCKET=sharedstorage-storage