Skip to content

Latest commit

 

History

History
52 lines (49 loc) · 1.22 KB

File metadata and controls

52 lines (49 loc) · 1.22 KB

Requirement

  1. Cài đặt Jupyter notebooks
  2. Cài đặt PostgreSQL và postgis
  3. Cài đặt Nodejs
  4. Cài đặt Python

Install package

Chạy các lệnh sau:

pip install psycopg2 
pip install postgis
pip install shapely
pip install numba

Trong Bus_stop, chạy

npm install

Trong view, chạy

npm install

Add Data to DB

  1. Tạo database với extension postgis
  2. Mở file GetData.ipynb bằng Jupyter notebooks cấu hình lại các tham số user, password, dbname
  3. Run all

Server Configuration

Mở file Bus_stop/index.js điều chỉnh lại các tham số trong client.

const client = new Client({
    user:'postgres',
    host:'localhost',
    password:'',
    database:'BusStopDatabase',
    port:5432
});

Mở file Bus_stop/demo.py điều chỉnh lại các tham số:

conn = psycopg2.connect(database="BusStopDatabase", user="postgres", password="", host="127.0.0.1", port="5432")

Run Server

Vào thư mục Bus_stop chạy:

npm run start:dev

Vào thự mục view chạy:

npm start