Skip to content

Instantly share code, notes, and snippets.

@lukeocodes
Last active July 21, 2024 10:20
Show Gist options
  • Save lukeocodes/7ab0614fd0d44e327ff1c1c17b47b301 to your computer and use it in GitHub Desktop.
Save lukeocodes/7ab0614fd0d44e327ff1c1c17b47b301 to your computer and use it in GitHub Desktop.
Adding dev-https to your package file for local HTTPS development
{
"name": "web",
"version": "0.1.0",
"private": true,
"scripts": {
"dev-https": "cross-env NEXT_PUBLIC_APP_URL=yourdomain.com cross-var next dev . --hostname=$NEXT_PUBLIC_APP_URL --experimental-https",
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
},
"dependencies": {
"next": "14.2.1",
"react": "18",
"react-dom": "18",
... etc
},
"devDependencies": {
"@types/react": "18",
"@types/react-dom": "18",
"cross-env": "^7.0.3",
"cross-var": "^1.1.0",
... etc
}
}
@lukeocodes
Copy link
Author

lukeocodes commented Jul 21, 2024

Remember to update your hosts file

127.0.0.1         yourdomain.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment