This was created during my time as a Code Chrysalis Student
- Added an .Env File. To locally connect to your database, please add a .env file to your workspace root folder.
- USER = "your user name without the quotes"
- PASSWORD = "your password without the quotes"
GET /api/locations
returns JSON data of locations
Table locations
- id
- latitude
- longitude
- site_name
- name
- state
- city
- highway
- type
- highway_exit_num,
- street_address,
- telephone,
- fax
Table amenities
- id
- location_id
- name
Table truck_services
- id
- location_id
- name
Table restaurants
- id
- location_id
- name
If you have a truckstop database created already run the following:
- Enter
psql
in your terminal drop database truckstop;
create database truckstop;
\c truckstop;
SHOW config_file;
will return the path to your config file. Copy the path\q
to exit PostgreSQLvim [PASTE YOUR PATH THAT YOU COPIED]
- Locate
max_connections
in the file and change its value to 500 - Click esc and enter
:wq
brew services restart postgresql
psql
- Enter
SHOW max_connections;
and the value should be changed to 500
heroku pg:psql -a cc12-vue-project