-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes tests and adds back ENABLE_HTTPS_FOR_DEV environment variable
- Loading branch information
Showing
11 changed files
with
163 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
**/*.env | ||
**/*.env | ||
node_modules |
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
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 |
---|---|---|
@@ -1,12 +1,26 @@ | ||
import { build } from './src/app.js' | ||
import { getConfig, setConfig } from './src/config.js'; | ||
import { build } from './src/app.js'; | ||
import { getConfig } from './src/config.js'; | ||
import http from 'http'; | ||
import https from 'https'; | ||
import logger from './src/utils/logger.js'; | ||
|
||
const run = async () => { | ||
await setConfig() | ||
const { port } = getConfig(); | ||
const { port, enableHttpsForDev } = getConfig(); | ||
const app = await build(); | ||
http.createServer(app).listen(port, () => console.log(`Server running on port ${port}`)); | ||
|
||
if (enableHttpsForDev) { | ||
https | ||
.createServer( | ||
{ | ||
key: fs.readFileSync('server-dev-only.key'), | ||
cert: fs.readFileSync('server-dev-only.cert') | ||
}, | ||
app | ||
).listen(port, () => logger.info(`Server running on port ${port} with https`)); | ||
} else { | ||
http | ||
.createServer(app).listen(port, () => logger.info(`Server running on port ${port} with http`)); | ||
} | ||
}; | ||
|
||
run(); |
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
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
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 |
---|---|---|
@@ -1,10 +1,19 @@ | ||
# PORT=4008 #default port is 4008 | ||
|
||
# the CRED_STATUS_* values are used to instantiate the status list manager | ||
CRED_STATUS_REPO_OWNER=jchartrand | ||
CRED_STATUS_REPO_NAME=status-test-three | ||
CRED_STATUS_META_REPO_NAME=status-test-meta-three | ||
CRED_STATUS_ACCESS_TOKEN= | ||
CRED_STATUS_SERVICE=mongodb | ||
STATUS_CRED_SITE_ORIGIN=https://credentials.example.edu | ||
CRED_STATUS_DB_URL=mongodb+srv://user:[email protected]?retryWrites=false | ||
CRED_STATUS_DB_HOST=domain.mongodb.net # ignored if CRED_STATUS_DB_URL is configured | ||
CRED_STATUS_DB_PORT=27017 # ignored if CRED_STATUS_DB_URL is configured | ||
CRED_STATUS_DB_USER=testuser # ignored if CRED_STATUS_DB_URL is configured | ||
CRED_STATUS_DB_PASS=testpass # ignored if CRED_STATUS_DB_URL is configured | ||
CRED_STATUS_DB_NAME= | ||
STATUS_CRED_TABLE_NAME= | ||
USER_CRED_TABLE_NAME= | ||
CONFIG_TABLE_NAME= | ||
EVENT_TABLE_NAME= | ||
CRED_EVENT_TABLE_NAME= | ||
CRED_STATUS_DID_SEED=z1AackbUm8U69ohKnihoRRFkXcXJd4Ra1PkAboQ2ZRy1ngB | ||
|
||
ERROR_LOG_FILE=logs/error.log | ||
|
Oops, something went wrong.