https://github.com/fullstackacademy/my_uni_app
https://github.com/fullstackacademy/my_uni_app
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fullstackacademy/my_uni_app
- Owner: FullstackAcademy
- Created: 2023-03-20T16:47:35.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-20T19:23:30.000Z (about 3 years ago)
- Last Synced: 2025-04-11T20:21:24.158Z (about 1 year ago)
- Language: JavaScript
- Size: 82 KB
- Stars: 5
- Watchers: 24
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# To run locally
- Create a database called my_uni_app_db with the command `createdb my_uni_app_db`
- In your terminal, from within the project directory, run the following commands:
- `npm install` to install project dependencies
- `node server/db/seed.js` to seed the database
- `npm run start:dev` to start the server
# To deploy on render.com
#### Create the Database
- Create a new PostgreSQL service in the render dashboard, and fill out the following input fields:
- Name
- Region (take note of the region as you will use it later)
- Create the database
- Copy the internal database url for use when creating the Web Service
#### Create the Web Service
- Create a new Web Service
- Select the repo from the list of repos if you have linked your GitHub account. Alternatively, you can copy and paste a link to your repo if it is public.
- Fill out the following input fields:
- Name
- Region (select the same region as the PostgreSQL service)
- Build Command:
- `npm install && npm run build && node server/db/seed.js`
- Start Command:
- `node server/index.js`
- Scroll down and select "Advanced" to add the following environment variables:
- NODE_VERSION: 14.18.1
- DATABASE_URL: {internal connection URL from the PostgreSQL database}
- NOTE: As you develop your applications, you may need to add additional environment variables. Any variable you reference from within the code from `process.env.KEY_NAME` will need to be added to your production environment.
- 