This is the code that powers the http://www.arbolista.mx site. It is built on top of the Espina boilerplate.
Install dependencies with npm i. You may need to sudo.
ReCAPTCHA is used for submissions through the contact form.
Copy and configure env variables.
cp .env.example .env
// Set:
CAPTCHA_SECRET_KEY=x
SENDGRID_TOKEN=x
SENDGRID_TEMPLATE_ID=x
[email protected]
export $(cat .env | xargs)
To run the development server,
npm run developGo to localhost:3000 to view app.
To run the production Node server with server-side rendering in a Docker container, a Docker image needs to be built and the container to be launched:
docker build -t arbolista-site .
(docker stop arbolista-site || exit 0) && \
(docker rm arbolista-site || exit 0) && \
docker run \
-d \
-p 0.0.0.0:3000:3000 \
--name arbolista-site\
--env-file .env\
arbolista-siteGo to localhost:3000 to view app.
Alternatively the server can be started outside of a Docker container using,
npm run production