Website for sharing meals together. Invite your best friends or your family for dinner!
This project is an exercise for HackYourFuture students to learn the concepts of full stack development with a focus on the connection between:
Database <--> Webserver <--> Frontend
The homework for week4 should be made in a standalone repo on your github profile, so you can show it friends/new employeers/headhunters etc.
Here are the steps to do that:
- Create a new repository on your github profile.
- Clone that repository down locally.
- Copy the code for the template from the this folder into the newly created repo.
- Now copy last weeks
serverfolder into the new repo in thesrcfolder. You will now have aserverfolder and aclientfolder in thesrcfolder. - Add, commit and push the changes to your github.
- In the
hyf-homework/node/week4just add a text file with the link to the newly created repo. - Thats it 🎉
To access the server api, use localhost:3000/api
All sensitive data like fx passwords and usernames, we dont want to add to git! This problem we solve by having environment variables. Environment variables are not committed to git and have a key value structure.
In the project there is a file called .env.example that has the correct structure. Copy this file and rename the copied file to .env. Now edit the credentials for your database.
The environment variables are then used in node using process.env.DB_HOST, you can see that in the src/serverdatabase.js file.
- Postman
- MySQL Workbench
- A heroku user
To install run npm install
To run npm run dev
Now go to http://localhost:3000/ to see the website
Set Heroku with automated builds to the master branch. push your code to the master branch.
- @benna100 - Idea & Initial work