Author: Gita Alekhya Paul
The Medium Article accompanying this GitHub Repository can be found here.
#Install Netlify CLI (May require sudo privileges in some OSes)
npm install -g netlify-cli
# Install Dependencies (Will also compile the code.)
npm install
Create a file named .env
with the following environmental variables:
PORT = "<Port Number when executing with Node.js>";
MONGO_URI = "<Your MongoDB Connection String>";
MONGO_DBNAME = "<Your MongoDB Database Name>";
# To compile TypeScript code into JS and then compile into lambda functions
npm run build
# To start a local Node Server for development purposes
npm run start:dev
# To start the Netlify Dev Environment
npm run start:netlify
MONGO_URI = "<Your MongoDB Connection String>";
MONGO_DBNAME = "<Your MongoDB Database Name>";