A login API server written in node.js
and mongo
It is a simple login server, which can be used to handle authentication for a web app.
Was exploring ejs
and decided to build this.
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of
node
andmongo
To get node-login, follow these steps:
git clone https://github.com/2kabhishek/node-login
cd node-login
For using the app you will need a working MongoDB instance, you can use either MongoDB Atlas or a local instance.
To set the MONGO_URI
env var use the following command.
export MONGO_URI="mongodb+srv://username:password@db-location"
You will need to have a working version of Node and npm installed on your system.
After that you can run the following command to install the required packages.
npm install
Running The Server
To run the server execute the following command
node server.js
After running the server, open up your web browser and go to this url to access the Web App.
node-login was built using neovim, node, mongo, express
among others.
- Setting up MongoDB locally was a bit tricky, using docker or Atlas is recommended.
- Explored
ejs
- Setup a basic session manager.
Hit the โญ button if you found this useful.