This is a fully functional basic React app seed. It comes with Redux and Passport/Auth0 already set up, and uses Node, Express, Massive, and SQL for the back end.
- Clone this seed
- In the terminal, navigate to the project folder and run 'npm i'
- Create a 'config.js' file in the server folder (It is already ignored).
module.exports = {
secret: "aetbmjljfcbn!%$*$nkrlhlkhnannalvlwher#$%66345nlk",
auth0:{
clientID: "Auth0 client ID goes here",
clientSecret: "Auth0 client secret goes here"
},
connection: {
host: //host (you'll find this info in your heroku db credentials),
port: //port,
database: //database,
user: //user,
password: //password
ssl: true
},
port: 8000
};
Note - Having the backend run on port 8000 allows npm start to run on port 3000 at the same time. This allows you to build your front end using npm start, while the backend will still respond to local api calls.
- For development - Use two terminals. Navigate to the project folder on both, and run npm start on one, and nodemon on the other.
- For production - Navigate to the project folder and run npm run build. Once that is done, run nodemon.