Node server will act as proxy server for other backend services
-
Install
mkcert
, there are instructions for macOS/Windows/Linux (https://github.com/FiloSottile/mkcert). -
mkcert -install
to create a local CA. -
mkcert *.sellerspot.in *.dev.sellerspot.in *.dev1.sellerspot.in localhost 127.0.0.1 ::1
to create a trusted cert for the mentioned domains in the current directory. -
The above command will generate _wildcard.sellerspot.in+4-key.pem and _wildcard.sellerspot.in+4.pem files under security folder. (watch the file names)
-
If You're using node (which doesn't use the system root store), so you need to specify the CA explicitly in an environment variable (especially in linux), with following command.
export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem
". -
Run the server with
npm run dev
.
127.0.0.1 sellerspot.in
127.0.0.1 api.sellerspot.in
127.0.0.1 accounts.sellerspot.in
127.0.0.1 dev.sellerspot.in
127.0.0.1 app.dev.sellerspot.in
127.0.0.1 dev1.sellerspot.in
127.0.0.1 app.dev1.sellerspot.in