Skip to content

New Developer Guide

Jason Kiesling edited this page Oct 5, 2018 · 8 revisions

Welcome to the backend team for MYR! Below is (hopefully) everything you need to get started.

About the backend

MYR is built using the MERN stack. MERN stands for Mongo, Express, React, and Node. We use Mongoose as an ODM to interact with the database.

MYR is hosted on a virtual machine at UML. Read more information about the server in the sidebar.

Getting started

  1. Navigate to the parent directory of where your MYR development environment is. If you do not have one already set up, visit the MYR wiki. Be sure you're in the parent directory of the MYR build. Your paths should end up looking something like /home/user1/MYR/MYR and /home/user1/MYR/MYR-backend.
  2. Clone the repo. Run `git clone https://github.com/jasondkiesling/myr-backend.git.
  3. Install MongoDB using the directions from Mongo.
  4. Create an empty folder called public by running mkdir public within the MYR-backend.
  5. Navigate to the public folder with cd public.
  6. Create an empty folder called myr inside public by running mkdir myr.
  7. Create an empty folder called admin inside public by running mkdir admin.
  8. Navigate to the MYR folder and run yarn prod to build MYR and move it to your new folder.
  9. If you do not already have NPM, install NPM.
  10. Run npm install within the MYR backend to install the dependencies.
  11. Add the config file to /config/config.js. Contact Jason for that file.
  12. Coming soon Import the default database.
  13. Create a new branch by running git branch [new-branch-name] The branch name should reflect your current project. New branches are created for each new project and then deleted after the pull request is approved.
  14. Run npm start to start the server or npm run dev (this one restarts the server whenever you save a file). Then navigate to http://localhost:1337. Use ctrl + c to stop the server.
  15. Start developing!