{"repo":"Black-Axe/TSMongoExpressSessionAuth","free":true,"listed":false,"github":"https://github.com/Black-Axe/TSMongoExpressSessionAuth","clone":"git clone https://github.com/Black-Axe/TSMongoExpressSessionAuth.git","description":"Server session authentication built in Express with Typescript, Mongodb, and a front end UI built in React","language":"JavaScript","stars":19,"topics":["node","expressjs","react","mongodb","typescript","mongoose","passport","passportlocal"],"license":"MIT","category":"databases-storage","readme_excerpt":"MongoDB TypeScript Passport-Session backend with React front-end client Features: Typescript Validation/Middleware SudoRoutes Protected Routes Front-end client interface User access levels Session storage MongoDb Passport Reset Password flow Overview MongoDB must be setup and running for the server to connect. A default string is provided, in config, but can be reconfigured. MongoDB automatically creates the collections for you. A function is provided that populates the database with usertpes, that is used for access later. A client UI is provided in React, where navigating to and running , where stat up the UI. The first user created is given an admin status, where the server handles the logic. Prerequisites - Install dependencies - Build and run the project with auto reload (nodemon) - Build and run the project - Compile - Run in dev - Run in production Finally, navigate to http://localhost:11000/ and you should see the API running! MongoDB Put the MongoURI string into the default.json file located in The app uses a function called located in the server file, that populates the database with user data types only once. (Checks if the database already has data and wont update on subsequent runs) Models Routes Register Requires email and password and passwordConfirm and username Middleware handles validation Passport handles session storage with connect-mongo Route Description ----- ----- POST /register Create new user from username, email and password POST localhost:11000/reg","default_branch":null,"files":null,"tree":[],"storefront":"/r/Black-Axe","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Black-Axe/TSMongoExpressSessionAuth/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}