Pre-preparation
- brew install postgresql
- brew services start postgresql
==> Successfully started
postgresql
(label: homebrew.mxcl.postgresql) - postgres=# CREATE ROLE beam WITH LOGIN PASSWORD 'password';
- Log in with new user: psql -d postgres -U beam
- Create Database: CREATE DATABASE scooters;
- Access to new DB: postgres=> \c scooters
- Create DB schema:
CREATE TABLE scooter_info ( id SERIAL PRIMARY KEY, lat VARCHAR(50), long VARCHAR(50), country VARCHAR(150), name VARCHAR(100) );
- Test your schema: scooters=> select * from scooter_info;
id | lat | long | country | name
----+-----------+------------+---------------+--------------------
If you see this. It works.
- Clone code from [email protected]:vanlongnguyen/scooter.git
- npm install
- npm start
Access to http://localhost:80/