-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
"use strict"; | ||
|
||
/** | ||
* A simple configuration to setup fastify to serve routes for the | ||
* Electrode X webapp. | ||
* | ||
* To support config composition base on environment, checkout these: | ||
* | ||
* 1. https://www.npmjs.com/package/electrode-confippet | ||
* 2. https://www.npmjs.com/package/config | ||
* | ||
*/ | ||
exports.config = { | ||
connection: { | ||
host: process.env.HOST || "localhost", | ||
// Allow Electrode X to control app's listening port during dev | ||
// to serve both static assets and app under a unified proxy port | ||
port: parseInt(process.env.APP_SERVER_PORT || process.env.PORT || "3000") | ||
}, | ||
plugins: { | ||
/** | ||
* Register the dev support plugin | ||
*/ | ||
"@xarc/app-dev": { | ||
priority: -1, | ||
enable: process.env.WEBPACK_DEV === "true" | ||
}, | ||
/** | ||
* Register the server routes plugin for the app | ||
*/ | ||
"subapp-server": { | ||
options: { | ||
cdn: { | ||
enable: process.env.NODE_ENV === "production" | ||
} | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters