docs: updated README

* and small documentation changes
This commit is contained in:
Florent Chehab
2020-04-19 18:14:44 +02:00
parent d5cb969ee5
commit ffff0899cc
4 changed files with 10 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ const devServerConfig = {
maxModules: 0
},
proxy: {
// proxies for the backend
'/api': 'http://localhost:3000',
'/uploads': 'http://localhost:3000',
'/ws-api': {

View File

@@ -18,6 +18,8 @@ const server_mode = args.mode === "production" ? SERVER_MODES.PRODUCTION : SERVE
if (server_mode === SERVER_MODES.DEVELOPMENT){
console.info("Starting server in development mode.");
startFrontendDevServer(8080);
// this time, it's the frontend server that is on port 8080
// requests for the backend will be proxied to prevent cross origins errors
startBackendServer(3000);
} else {
console.info("Starting server in production mode.");