README updated
This commit is contained in:
@@ -20,7 +20,7 @@ You can run the node server by moving to the server directory and running `npm s
|
|||||||
|
|
||||||
The Angular Development Server can be started by running `ng serve`
|
The Angular Development Server can be started by running `ng serve`
|
||||||
|
|
||||||
Endpoints are configured to proxy to the node server.
|
Endpoints are configured to proxy to the node server, which is running on http://localhost:3000. The Angular App will be running on http://localhost:4200 The proxy is setup to send `/api/[endpoint]` to the server. Keep this in mind while in development.
|
||||||
|
|
||||||
# Building
|
# Building
|
||||||
|
|
||||||
|
|||||||
@@ -55,12 +55,12 @@
|
|||||||
"serve": {
|
"serve": {
|
||||||
"builder": "@angular-devkit/build-angular:dev-server",
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "rock-paper-scissors:build"
|
"browserTarget": "rock-paper-scissors:build",
|
||||||
|
"proxyConfig": "src/proxy.conf.json"
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"browserTarget": "rock-paper-scissors:build:production",
|
"browserTarget": "rock-paper-scissors:build:production"
|
||||||
"proxyConfig": "src/proxy.conf.json"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ app.use(bodyParser.urlencoded({ extended: false }));
|
|||||||
app.use(cookieParser());
|
app.use(cookieParser());
|
||||||
app.use(express.static(path.join(__dirname, '../dist')));
|
app.use(express.static(path.join(__dirname, '../dist')));
|
||||||
|
|
||||||
app.use('/', routes);
|
app.use('/api', routes);
|
||||||
|
|
||||||
// catch 404 and forward to error handler
|
// catch 404 and forward to error handler
|
||||||
app.use(function(req, res, next) {
|
app.use(function(req, res, next) {
|
||||||
|
|||||||
Reference in New Issue
Block a user