/ESTOOLS-server

ESTOOLS server

Primary LanguageJavaScriptMIT LicenseMIT

[TOC]

ESTOOLS-server

Usage in dev mode

1. Install mongodb in your local machine and create a data base named estools_db
  1. Download and install mongo shell and mongo compas from mongo tools.
    In mongosh run
  2. /> use estools_db to create estools_db
    Now you can access this database via the connection string mongodb://localhost:27017/estools_db and manipulate it in mongodb compas locally.
2. Clone this repo and add proper configuration
  1. Clone this repo.

  2. Run npm i to install packages

  3. Create a folder named config in the root project directory and add the config files as follows:

     config/
         api.config.js
     	auth.config.js
     	db.config.js
     	email.config.js
    
  4. Add the files content:

// config/api.config.js
module.exports = {
  HOST: "localhost",
  PORT: 8085,
};
// config/auth.config.js
module.exports = {
  auth_secret: "estools_penguins",
  verification_secret: "estools_penguins",
};
// config/db.config.js
module.exports = {
  HOST: "localhost",
  PORT: 27017,
  DB: "estools_db",
};
// config/email.config.js

module.exports = {
  email: "estools.contact@gmail.com",
  password: "will be shared privately if needed",
  client_secret: "will be shared privately if needed",
  client_id:
    "will be shared privately if needed",
  refresh_token:
    "will be shared privately if needed",
  token_uri: "https://oauth2.googleapis.com/token",
};
3. Run API in debugging mode or />npm start
4. Test the API in postman using this Shared Team Workspace