- Prerequisite
- node(8.x)
- yarn(latest)
- Prepare
- (Optional) Prepare google analytics id
- Run
mv client/src/config.example.js client/src/config.js
and modify client/src/config.js - Run
mv client/.example.env client/.env
and modify client/.env (optional replace theREACT_APP_GA_ID
) - Replace client/public/bg.jpg
- Build client js:
cd client && yarn install && npm run build
- Run server:
cd server && yarn install && npm run start
Now you can visit your server at http://localhost:5000
Run node server/bin/queryZipCode.js
This script will iterate each user's address and get taiwan zip code(3+2) from http://zip5.5432.tw/, delay 1.5 seconds each.
The data is store at server/db.sqlite, a sqlite database.
You can use your favorite sqlite client to export data, eg: sqlite3 -column -csv -header server/db.sqlite 'select * from form'
- Run webpack-dev-server:
cd client && npm run start
- Run server:
cd server && npm run start
- Browse http://localhost:3000
- Edit code and enjoy auto-reload!
- Edit code and run server:
cd server && npm run start