Skip to content

Instantly share code, notes, and snippets.

@FLamparski
Created June 26, 2017 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FLamparski/108612ab1f83ff0beb7a158b05df7e95 to your computer and use it in GitHub Desktop.
Save FLamparski/108612ab1f83ff0beb7a158b05df7e95 to your computer and use it in GitHub Desktop.
Hey, add this to your package.json to generate a self-signed cert for each project, then use it with webpack-dev-server https server!
"scripts": {
"serve-dev-secure": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --progress --https --cert certs/cert.pem --key certs/key.pem",
"make-certs": "mkdir -p certs && openssl req -x509 -newkey rsa:4096 -keyout certs/key.pem -out certs/cert.pem -days 365 -nodes -subj '/CN=localhost'"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment