1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 09:25:22 -04:00

support local next dev ports other than 3000

This commit is contained in:
Jake Jarvis 2022-06-11 08:37:15 -04:00
parent 9c15cc454b
commit fe634738ef
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
2 changed files with 4 additions and 4 deletions

View File

@ -7,12 +7,10 @@ module.exports = {
timeZone: "America/New_York", // https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
baseUrl:
// NOTE: no trailing slashes!
process.env.NEXT_PUBLIC_VERCEL_ENV === "production"
? "https://jarv.is"
: process.env.NEXT_PUBLIC_VERCEL_URL
process.env.NEXT_PUBLIC_VERCEL_URL && process.env.NEXT_PUBLIC_VERCEL_ENV !== "production"
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: process.env.IS_DEV_SERVER
? "http://localhost:3000"
? `http://localhost:${process.env.NEXT_DEV_PORT}`
: "https://jarv.is", // fallback to production URL
onionDomain: "http://jarvis2i2vp4j4tbxjogsnqdemnte5xhzyi7hziiyzxwge3hzmh57zad.onion",
shortDescription: "Front-End Web Developer in Boston, MA",

View File

@ -31,6 +31,8 @@ module.exports = (phase, { defaultConfig }) => {
NEXT_PUBLIC_RELEASE_DATE: new Date().toISOString(),
// check if we're running locally via `next dev`:
IS_DEV_SERVER: phase === PHASE_DEVELOPMENT_SERVER,
// https://nextjs.org/docs/api-reference/cli#development
NEXT_DEV_PORT: process.env.PORT || 3000,
},
images: {
deviceSizes: [640, 750, 828, 1080, 1200, 1920],