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
No known key found for this signature in database
GPG Key ID: 9A0CE018889EA246
4 changed files with 10 additions and 3 deletions

View File

@ -24,14 +24,18 @@ You can run this app with and without docker
### Without Docker
1. install the latest NodeJs
2. Clone the app
3. Run `npm i` inside the folder
4. Run `node server.js`
3. Run `npm ci` inside the folder
4. Run `npm run start:prod`
5. Surf to http://YOURIP:8080
### With Docker
1. `docker run -d -p 8080:8080 rofl256/whiteboard`
2. Surf to http://YOURIP:8080
## Development
After you have installed the app, run `npm run start:dev` to lunch the backend and a frontend development server. The website will be accessible on http://locahost:8080.
## Default keyboard shortcuts
Use keyboard shortcuts to become more productive while using Whiteboard.

View File

@ -11,7 +11,7 @@ const devConfig = merge(baseConfig, {
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(),
new webpack.NoEmitOnErrorsPlugin(), // don't reload if there is an error
new webpack.NoEmitOnErrorsPlugin(),
].concat(baseConfig.plugins),
});

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.");