Skip to content

Latest commit

 

History

History
56 lines (45 loc) · 1.7 KB

File metadata and controls

56 lines (45 loc) · 1.7 KB

Setup a Development Environment

This page will guide you on setting up a development environment for this project.

Prerequisites

  • Node
  • NPM
  • Code Editor of your choice

Steps

  1. Fork the project then clone it. Example:

    git clone git@github.com:Jet-Set-Radio-API/JetSetRadio-API.git
  2. Install Dependencies

    nvm use && npm install
  3. Create a local MongoDB Database or in Atlas

  4. Obtain the database Connection URI

  5. Fill out a .env file. You can use the .env.example file as a template. it needs to be renamed to qa.env

    • Reference this example uri with yours to extract what is needed for the .env file
    mongodb+srv://<USER>:<PASSWORD>@<CLUSTER>.<DOMAIN>?retryWrites=true&w=majority
    

    qa.env example

    PORT=
    BASE_URL=http://localhost:<PORT>
    LOG_LEVEL=info
    
    # MONGO CONNECT (get from connection string)
    MONGO_URI=
    
    # MONGO DATABASES (names do not matter)
    JSR_DB=
    JSRF_DB=
    BRC_DB
    CORE_DB=
    

    The databases section in the env file are names of the databases. For development purposes it does not matter what these names are but I recommend labeling it as QA-JSR, QA-JSRF, QA-BRC, or something similar.

  6. Run the project

    npm run qa
  7. (Optional) - To populate your local database with production data, hit the /pipe route in your browser or using Postman. The logs will indicate if the piping was successful.

    http://localhost:3005/pipe

    Warning: hitting this route will delete EVERYTHING from your local database and populate it exactly with what exists in production.