https://github.com/thinkful-ed/starter-weatherzen-back-end
https://github.com/thinkful-ed/starter-weatherzen-back-end
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thinkful-ed/starter-weatherzen-back-end
- Owner: Thinkful-Ed
- Created: 2020-12-10T12:22:32.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-01-11T02:00:56.000Z (over 2 years ago)
- Last Synced: 2024-01-11T05:08:03.099Z (over 2 years ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 10
- Forks: 458
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WeatherZen Backend Application
This starter code for the "Connecting it all" module in the Thinkful curriculum.
## Existing files
As you work through the Node.js, Express & PostgreSQL module, you will be writing code that allows your controllers to connect to and query your PostgreSQL database via [Knex](http://knexjs.org/). The table below describes the files and folders in the starter code:
| Folder/file path | Description |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `src/app.js` | Directs requests to the appropriate routers. |
| `src/server.js` | Starts the server on `localhost:5000` by default. |
| `src/db/` | A folder where you will add migration and seed files for your database later on. |
| `src/errors/` | A folder where you will find several functions for handle various errors |
| `.env.sample` | A sample environment configuration file |
This starter code closely follows the best practices and patterns established in the Robust Server Structure module.
## Database setup
1. Set up a new database instance by following the instructions in the "PostgreSQL: Creating & Deleting Databases" checkpoint.
1. After setting up your database instance, connect DBeaver to your new database instance by following the instructions in the "PostgreSQL: Installing DBeaver" checkpoint.
## Installation
1. Fork and clone this repository.
1. Run `cp .env.sample .env`.
1. Update your `.env` file with a connection URL to your database instance.
1. Run `npm install` to install project dependencies.
1. Run `npm run start:dev` to start your server in development mode.
If you have trouble getting the server to run, reach out for assistance.