- Setup your AWS credentials
- Create a file at the root directory called
config.ini
. Contents should look like the following:mongoDbLocation=MONGO_DB_CONNECTION_STRING s3LoggingBucket=rw3000-logs
- Open VS Code
- Select
Web Server
orGame Server
- These options are specified in
.vscode/launch.json
- These options are specified in
- Click the green triangle to start debugging
The infrastructure/
folder defines all the AWS resources in the form of TypeScript using CDK (see the API reference).
- Install EB CLI (Note the compatibility notes. If you have trouble installing, try EB CLI version 3.14.5 or earlier.) (If YAML errors, try: pip install PyYAML==3.11)
cd src
- Run
eb deploy
(for specific environment: 'eb deploy EnvironmentName')
npm install -g cdk
if you haven't installed CDKcd infrastructure
if you're not in the directorynpm run build
cdk diff
see what's going to change before doing itcdk deploy
- FTP files onto EC2
- download and install npm
- npm install nodejs
- npm install
- sudo su
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
- nvm install 12.10.0
- npm install -g pm2
- pm2 start app.js -f -- 3001
- pm2 start app.js -f -- 3002 (etc for however many ports you want to run on a single server)
- pm2 startup (Gets startup script - run the result in terminal)
- pm2 save
- pm2 unstartup systemv