Express-Server Starter Template with HTTPS Server and React Application to use with Boxfuse. See the BlogPost about Microservices with Boxfuse.
# CLONE
git clone https://github.com/comsysto/express-react-boxfuse-starter.git
cd express-react-boxfuse-starter
# Install Frontend + Server Dependencies
npm install
cd server
# START APP INSTANCE
boxfuse run -ports.https=10444 -live
## OR
# START APP INSTANCE - with some env vars
boxfuse run -ports.https=10444 -live -envvars.BACKEND=dev
# BUILD JS+CSS BUNDLE AND WATCH FOR CHANGES
cd ../
npm run develop
Now go to https://localhost:10444 and accept the self signed certificate.
You should see something like this:
There is already one self signed certificate residing in ./server/ssl/
.
You should at best put a valid wildcard SSL Certificates to ./server/ssl/
see ./server/server.js
on how to configure SSL.
How to generate self signed certificate:
cd express-react-boxfuse-starter/server/ssl
openssl req -nodes -new -x509 -keyout app.key -out app.crt
# Country Name (2 letter code) [AU]:DE
# State or Province Name (full name) [Some-State]:DE
# Locality Name (eg, city) []:DE
# Organization Name (eg, company) [Internet Widgits Pty Ltd]:DE
# Organizational Unit Name (eg, section) []:DE
# Common Name (e.g. server FQDN or YOUR name) []:localhost
# Email Address []:foo@bar.de