A simple note taking web application with a basic authentication system. Uses express for backend routing pipeline/middleware and ejs templates to serve psuedo-static html pages from the /views directory.
Checkout the demo hosted on Azure.
In a nutshell, the code is based on the MVC architechture, with the following quirks:
- An
expresshttp server acts as the controller and routes the requests through the middleware stack. Mongooseis used to createmongoDBmodels/schema for the database.- Authentication system uses JWTs for login adhereing to the basic OAuth0 protocols.
- Frontend is written is pure vanilla JS and uses
fetch APIto make backend requests.
To run locally, first clone this repo:
git clone https://github.com/sravanth-chebrolu/take-notes
Install MongoDB locally and tart your own local MongoDB server OR create a free 500 MB cluster on MongoDB Atlas, either way once you're done creating the database, note the server URI.
In case you're running locally, the URI will generally be localhost:27017.
Create a .env file at the root directory in the following format, replace the fields with their respective values, where MONGO_URI is the URI to your local/cloud database, and PORT is where the express server will run.
MONGO_URI='<YOUR_MONGO_URI>'
PORT=<YOUR_SERVER_PORT>
After finishing the setup, run the following command to start a local server
npm start
In case you come across this repo as a beginner or you simply want to contribute, feel free to leave an issue/pull request.
The author will be pleased to see look at your ideas.
