mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-23 17:12:53 +03:00
feat(env): add NEXT_PUBLIC_NODE_ENV
This commit is contained in:
parent
edbd3b5e5a
commit
4f1b0d951c
@ -72,6 +72,7 @@ PUBSUB_SECRET=pKLO4lbzdMrhAFKwPo9bnmq03bxQrtu3
|
||||
NEXT_PUBLIC_URI_SHOVEL=http://localhost:4242
|
||||
NEXT_PUBLIC_URI_FIJI=ws://localhost:6464
|
||||
NEXT_PUBLIC_URI_LENS=http://localhost:1313
|
||||
NEXT_PUBLIC_NODE_ENV=development
|
||||
```
|
||||
|
||||
### Setup pubsub server
|
||||
|
@ -1,5 +1,7 @@
|
||||
export const NODE_ENV = process.env.NEXT_PUBLIC_NODE_ENV;
|
||||
|
||||
//NOTE(amine): feature flags
|
||||
export const ACTIVITY_FEATURE_FLAG = !!process.env.NEXT_PUBLIC_ACTIVITY_FEATURE_FLAG;
|
||||
export const ACTIVITY_FEATURE_FLAG = NODE_ENV === "development" || NODE_ENV === "staging";
|
||||
|
||||
// NOTE(jim): External servers
|
||||
export const URI_SHOVEL = process.env.NEXT_PUBLIC_URI_SHOVEL;
|
||||
|
@ -3,7 +3,7 @@ import * as Environment from "~/node_common/environment";
|
||||
import configs from "~/knexfile";
|
||||
import knex from "knex";
|
||||
|
||||
const envConfig = configs[Environment.NODE];
|
||||
const envConfig = configs[Environment.NODE_ENV];
|
||||
const Database = knex(envConfig);
|
||||
|
||||
export default Database;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* eslint-disable prefer-destructuring */
|
||||
export const NODE = process.env.NODE_ENV || "development";
|
||||
export const IS_PRODUCTION = NODE === "production";
|
||||
export const NODE_ENV = process.env.NEXT_PUBLIC_NODE_ENV;
|
||||
export const IS_PRODUCTION = NODE_ENV === "production";
|
||||
export const PORT = process.env.PORT || 1337;
|
||||
export const SOURCE = process.env.SOURCE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user