Skip to content

Commit eee97ba

Browse files
authored
Merge pull request #2 from AnimuAPI/staging
⚡️Added express to start static build files
2 parents 2ebd4c8 + a979d0d commit eee97ba

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

app.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const express = require('express');
2+
const app = express();
3+
const PORT = 4000; // PORT for the Express server to run on
4+
app.set('trust proxy', 1);
5+
6+
app.use('/', express.static('docs-dist'));
7+
app.listen(PORT, () => {
8+
console.log(`⚡️[server]: Server is running at http://localhost:${PORT}`);
9+
});

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"author": "Kyoyo",
77
"license": "AGPLv3",
88
"scripts": {
9-
"start": "serve -s docs-dist",
9+
"start": "node app.js",
1010
"dev": "dumi dev",
1111
"build": "dumi build",
1212
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\""
@@ -26,13 +26,13 @@
2626
]
2727
},
2828
"dependencies": {
29+
"express": "^4.17.1",
2930
"react": "^16.12.0"
3031
},
3132
"devDependencies": {
3233
"dumi": "^1.0.14",
3334
"lint-staged": "^10.0.7",
3435
"prettier": "^2.2.1",
35-
"serve": "^12.0.0",
3636
"yorkie": "^2.0.0"
3737
}
3838
}

0 commit comments

Comments
 (0)