-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
44 lines (41 loc) · 1.27 KB
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
module.exports = (phase, { defaultConfig }) => {
/**
* Use environment variables from the local file in development only
*/
let env = {}
if (phase === PHASE_DEVELOPMENT_SERVER) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('dotenv').config({ path: '.env.build' })
env = {
JWT_SECRET: process.env.JWT_SECRET,
APP_URL: process.env.APP_URL,
WEBHOOK_BASE_URL: process.env.WEBHOOK_BASE_URL,
DATABASE_URL: process.env.DATABASE_URL,
SPOTIFY_CLIENT_ID: process.env.SPOTIFY_CLIENT_ID,
SPOTIFY_CLIENT_SECRET: process.env.SPOTIFY_CLIENT_SECRET,
SPOTIFY_REDIRECT_URL: process.env.SPOTIFY_REDIRECT_URL,
PUSHER_APP_ID: process.env.PUSHER_APP_ID,
PUSHER_APP_KEY: process.env.PUSHER_APP_KEY,
PUSHER_SECRET: process.env.PUSHER_SECRET,
}
}
return {
...defaultConfig,
env: {
...defaultConfig.env,
...env,
},
async redirects() {
return [
{
// we don't have a landing page yet so redirect to rooms for now
source: '/',
destination: '/rooms',
permanent: false,
},
]
},
}
}