Skip to content

Latest commit

 

History

History
63 lines (45 loc) · 2.36 KB

README.md

File metadata and controls

63 lines (45 loc) · 2.36 KB

oip-ddx-light

platform to publish oip types

Installing oip-ddx-light

Node module installation needs to happen in both /frontend and /backend seperately

  1. Navigate to the /frontend directory and run npm install
  2. Wait for installation to be completed
  3. Navigate to the /backend directory and run npm install
  4. Wait for installation to be completed

Adding enviornment variables

Navigate to the /backend directory in the root of the project. Add a new file in /backend called .env.

Inside the .env file you just created, copy and paste the code below:

MONGO_URL=<YOUR MONGO URL HERE>
NODE_ENV=development
JWT_SECRET=<YOUR JWT SECRET HERE>

Make sure to replace text contained between < > with your URL/keys

Defining Frontend and Backend domain urls

  1. In the /frontend folder, find the config.js file
  2. Enter the approriate domain connection within the backendApiUrl variable
backendApiUrl: '<ENTER DOMAIN URL HERE>',
  1. In the /backend folder, find the config.json file
  2. Enter the approriate domain connection within the DOMAIN_URL variable
"DOMAIN_URL": "<ENTER DOMAIN URL HERE>",

Running the application

To start the application properly, you must seperatly start both the /frontend and /backend directories

  1. Navigate to the /frontend directory and run npm run dev
  2. Open a seperate terminal session
  3. In the newly opened terminal session, navigate to the /backend directory and run npm run dev

Creating a free MongoDB atlas cluster and connecting oip-ddx-light

If you need to a database in which to store information about the application and its users, consider signing up for MongoDB Atlas. Navigate to MongoDB Atlas and create an account.

Once you have created your account:

  1. Find the Clusters tab on the left hand side of the screen: Figure 1

  2. Within your newly created cluster, click on CONNECT

  3. Of the options provided, click on Connect your application Figure 2

  4. Copy and paste the provided URL into your .env file, within the MONGO_URL variable (make sure to edit your password and name to the corresponding values) Figure 3

  5. Make sure to save your files!