-
Notifications
You must be signed in to change notification settings - Fork 7
/
config.js
28 lines (25 loc) · 841 Bytes
/
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
/* eslint-disable import/no-commonjs */
const isDevelopment = process.env.NODE_ENV === 'development';
/* Heroku binds a port and database url to process.env, we are
* required to use them when using Heroku.
*/
const productionPort = process.env.PORT || 8080;
const localDbUrl = 'postgres://postgres:password@localhost:5432/boilerplate';
const productionDbUrl = process.env.DATABASE_URL || localDbUrl;
module.exports = {
env: process.env.NODE_ENV || 'development',
meta: {
title: 'Slack in React'
},
server: {
host: 'localhost',
port: isDevelopment ? 3000 : productionPort,
},
secretKey: 'd98d1690-7f39-4676-830d-7cf8720b1475',
dbUrl: isDevelopment ? localDbUrl : productionDbUrl,
devServerPort: 3001,
assetTransferPort: 3003,
authTokenName: 'token',
graphqlEndpoint: '/api/graphql',
isDevelopment,
};