acmucsd-projects / su24a-hack-team-2

0 stars 3 forks source link

💻 MERN stack template

Template for building projects with the MERN (MongoDB, Express, React, Node.js) stack. This template was generated using create-next-app and express-generator for the client and server, respectively.

Prerequisites

DB_URL=mongodb://mongodburl.example.com:portnumber

Running

  1. cd into client and run the command yarn install to install all dependencies
  2. To start the client, run yarn dev in the same directory
  3. In another command window, cd into server and run yarn install and npm start to install all dependencies and start the server.
  4. To kill a port, use 'npx kill-port '
  5. For Linux/Mac use 'sudo lsof' to see what ports are active.
  6. For Windows, use 'netstat -a -b'
  7. If you want to change the port for server, head to the server/bins/www. Look for the line var port = normalizePort(process.env.PORT || '3001'); Change it to any port you like!
  8. Happy hacking!