The editor and live streaming portion of DevWars.
This repository holds two projects (client/server). For this reason you should never use npm in the root directory. Instead manage dependencies and npm script independently inside of each respective directory (client/server).
- Run
npm installin both the client and server directory to install dependencies. - Make a copy of
.env.examplein both the client and server directory and configure your environment variables to your liking. - Run
npm run devin both the client and server directory.
- Remove the
DEVWARS_API_TOKENenvironment key on the server side.
You can then set a cookie in your browser with the key token and one of the following values ADMIN, MODERATOR, USER to authenticate.
- Run
npm run buildin both the client and server directory. - Configure your web server to serve the
client/distdirectory. - Reroute
/adminand/playtoclient/dist/index.htmlto handle SPA routes. - Run
node server/dist/index.jsand preferably proxy it through a web server.
NOTE: The server does not use the .env in production!