Skip to content

naturalneuralnet/habitBuilder-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Express server with REST API for MongoDB CRUD functions.

Backend for the habitmaker webapp.

The app can be found here: https://habitmaker.onrender.com

Table of Contents

Local Usage

For the entire application to work, you must run this server simultaneously with the habitMaker-client in a separate terminal. You can find the client code here

Changes before local usage: Inside config/corsOptions.js change the allowedOrigins endpoint to the one you are running the client on. For example:

Alt text

Run npm install to install the project dependencies.

Run npm run dev to run the server locally.

Enviroment Variables: You will also need to add enviroment variables in a .env file

  • MONGO_URL: A URL to a MongoDB Atlas database you own
  • ACCESS_TOKEN_SECRET: A SSH key, can be generated with the ssh-keygen command in the terminal.
  • REFRESH_TOKEN_SECRET:A SSH key, can be generated with the ssh-keygen command in the terminal.
  • VERIFICATION_EMAIL: This must be an outlook email address. To use other email providers, adjust the nodemailer config.
  • VERIFICATION_EMAIL_PASSWORD:Verification email address password.

Technologies

  • Node.js
  • Express
  • MongoDb
  • Mongoose
  • JSON Web Tokens
  • CORS
  • Nodemailer

Credit

Coding Resources:

License

You can find the License for this project here

This project is licensed under the terms of the MIT license.

Releases

No releases published

Packages

No packages published