Website of RedPelicans (in progress)
A now well known incantation:
$ npm install -g yarn
$ yarn install
The first target of the project is to render pages server side. So we have to deal with a NodeJS server that will execute server but also client code and a bundle task drived by webpack to packed assets for browser. Two developement modes are available 1/ client side only, where a static index.html is served by webpack develepment server 2/ Full sides, where ...
$ yarn run client-dev
http://0.0.0.0:3000/
webpack result is served from /build/
content is served from ./public
Launch yor browser to http://0.0.0.0:3000
and code your
client, hot reload is enable. index.html
is a static file served from ./public
folder.
We need to rebuild webpack contents and write them to ./build
each time client code is modified and rerun server each time server code is ..., so run 2 commands in 2 seprated shells:
$ yarn bundle:dev
$ yarn server:dev
$ yarn bundle:build
$ yarn server:dist
$ yarn start
server started on http://0.0.0.0:5555
# cd website
# docker build --no-cache -t redpelicans/website .
# docker push redpelicans/website
// restart website and proxy