Documentation: Create-React-App.
https://github.com/facebook/create-react-app
npm test
In case you can't run tests: brew install watchman
Create .env
file from .env.example
template:
Run docker-compose:
docker-compose up
Then run
npm run server:dev
Notice:
Before start app in dev mode you need to run npm install
npm test:api
-
Imports in files should have the right order:
- 3-d party libs
- components
- components form the same folder
- constants
- methods/utils/hooks
- types
- css It will be changed after code style implementation from released MVP Generator 2.0
-
Default exports for pages and named exports is for other exports
-
If you see that something is not styled as it should be - change it.
We change code for email templates here https://github.com/fioprotocol/fio-dashboard-tools
Then we copy generated templates into dashboard app.
If you want to use BitPay locally you need to have public access to your running application for webhook and payment BitPay site redirectUrl. How to easy handle this on your machine?
- Install nginx -
https://www.nginx.com/
Useful links:
https://www.cyberciti.biz/faq/nginx-restart-ubuntu-linux-command/
- Install ngrok -
https://ngrok.com/
- You need to register there
- Configure nginx:
- I have 5555 port, you could use any other port you want. Add this to you
nginx.conf
server part:
# some default settings...
listen 5555;
server_name localhost;
location / {
proxy_pass http://localhost:3000;
}
location /api/v1 {
proxy_pass http://localhost:9006;
}
}
- Run nginx
- Run ngrok with command
ngrok http 5555
- Ngrok will return a pubilc url address like
https://564b-178-133-53-168.ngrok.io
. Set it asAPI_BASE_URL
and rerun server. Every time you run ngrok your public url address changes re-setupAPI_BASE_URL
and rerun server. Enjoy!