squeaknode/frontend
Jonathan Zernik c5e5889135
Rename get timeline squeak displays (#469)
* Rename get timeline squeak displays and don't filter for following

* Update static build
2020-11-20 23:26:14 -05:00
..
public Organize frontend (#346) 2020-10-29 23:21:38 -04:00
src Rename get timeline squeak displays (#469) 2020-11-20 23:26:14 -05:00
.gitignore Organize frontend (#346) 2020-10-29 23:21:38 -04:00
.prettierrc Organize frontend (#346) 2020-10-29 23:21:38 -04:00
build-protos.sh Organize frontend (#346) 2020-10-29 23:21:38 -04:00
changelog.md Organize frontend (#346) 2020-10-29 23:21:38 -04:00
LICENSE.txt Organize frontend (#346) 2020-10-29 23:21:38 -04:00
make-build.sh Organize frontend (#346) 2020-10-29 23:21:38 -04:00
Makefile Add squeak detail page (#412) 2020-11-07 22:19:24 -05:00
package-lock.json Organize frontend (#346) 2020-10-29 23:21:38 -04:00
package.json Organize frontend (#346) 2020-10-29 23:21:38 -04:00
pb_disable-eslint.sh Organize frontend (#346) 2020-10-29 23:21:38 -04:00
README.md Update readmes (#449) 2020-11-11 16:23:23 -05:00
yarn.lock Organize frontend (#346) 2020-10-29 23:21:38 -04:00

frontend

Build protos

  • Install protoc and protoc-gen-grpc-web: https://github.com/grpc/grpc-web#code-generator-plugin
    curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v3.12.2/protoc-3.12.2-linux-x86_64.zip -o protoc.zip && \
    	unzip -qq protoc.zip && \
    	cp ./bin/protoc /usr/local/bin/protoc
    
    curl -sSL https://github.com/grpc/grpc-web/releases/download/1.2.1/protoc-gen-grpc-web-1.2.1-linux-x86_64 -o /usr/local/bin/protoc-gen-grpc-web && \
    	chmod +x /usr/local/bin/protoc-gen-grpc-web
    
  • Run ./build-protos.sh

Run in dev mode

  • Build protos
  • Start the squeak server with the WEBADMIN_LOGIN_DISABLED and WEBADMIN_ALLOW_CORS environment variables:
    $ WEBADMIN_LOGIN_DISABLED=TRUE WEBADMIN_ALLOW_CORS=TRUE NETWORK=testnet docker-compose up
    
  • Start the frontend in dev mode with the REACT_APP_SERVER_PORT environment variable.
    $ npm install
    $ REACT_APP_SERVER_PORT=12994 npm start
    

Or run the following instead: $ make rundev

Build for production

  • Build protos
  • Make the build:
    $ npm install
    $ npm run build
    
  • Copy the generated build folder into squeaknode/admin/webapp/static/.
    $ cp -r build/ ../squeaknode/admin/webapp/static/
    

Or run the following instead: $ make build