forked from pwa-builder/pwabuilder-google-play
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.ts
More file actions
22 lines (19 loc) · 718 Bytes
/
server.ts
File metadata and controls
22 lines (19 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import dotenv from 'dotenv';
const app = require('./app');
const port = process.env.PORT || 3333;
const configResult = dotenv.config({
path: `./env/${app.get("env")}.env`
});
if (configResult.error) {
console.error("Error loading .env file", configResult.error);
} else {
console.info("Configured with environment file", configResult.parsed);
}
const jdk8Path = process.env.JDK8PATH;
const androidDevToolsPath = process.env.ANDROIDTOOLSPATH;
if (!jdk8Path || !androidDevToolsPath) {
console.error("Couldn't find environment variables for JDK8 path or Android Dev tools", app.get("env"), jdk8Path, androidDevToolsPath);
}
app.listen(port, () => {
console.log(`App listening on port ${port}`);
});