Update: Environment for Heroku Production

This commit is contained in:
Yûki VACHOT 2021-12-22 13:22:38 +01:00
parent d29741f9a8
commit 5024b297ec
3 changed files with 34975 additions and 3 deletions

View file

@ -20,7 +20,7 @@
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options": { "options": {
"outputPath": "dist/admin", "outputPath": "dist/frontend-admin",
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",

34972
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -3,9 +3,9 @@ const express = require('express');
const app = express(); const app = express();
const port = process.env.PORT || 3000; const port = process.env.PORT || 3000;
app.use(express.static(__dirname + '/dist/frontend')); app.use(express.static(__dirname + '/dist/frontend-admin'));
app.get('/*', function(req,res) { app.get('/*', function(req,res) {
res.sendFile(path.join(__dirname+ '/dist/frontend/index.html')); res.sendFile(path.join(__dirname+ '/dist/frontend-admin/index.html'));
}); });
app.listen(port, '0.0.0.0',() => { app.listen(port, '0.0.0.0',() => {