Skip to content

treatmet/SocketShot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nameless Conflict

Debug and Run

  1. Setup your AWS credentials
    1. Install the AWS CLIs
    2. Run aws configure
    3. Enter in your 2-part security credentials (available here)
  2. Create a file at the root directory called config.ini. Contents should look like the following:
    mongoDbLocation=MONGO_DB_CONNECTION_STRING
    s3LoggingBucket=rw3000-logs
  3. Open VS Code
  4. Select Web Server or Game Server
    • These options are specified in .vscode/launch.json
  5. Click the green triangle to start debugging

Infrastructure

The infrastructure/ folder defines all the AWS resources in the form of TypeScript using CDK (see the API reference).

How to Deploy using Beanstalk

  1. 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)
  2. cd src
  3. Run eb deploy (for specific environment: 'eb deploy EnvironmentName')

How to deploy (OBSOLETE)

  1. npm install -g cdk if you haven't installed CDK
  2. cd infrastructure if you're not in the directory
  3. npm run build
  4. cdk diff see what's going to change before doing it
  5. cdk deploy

Configuring an EC2 instance from Scratch

  1. FTP files onto EC2
  2. download and install npm
  3. npm install nodejs
  4. npm install

Install pm2 to automate server startup

  1. sudo su
  2. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
  3. nvm install 12.10.0
  4. npm install -g pm2
  5. pm2 start app.js -f -- 3001
  6. pm2 start app.js -f -- 3002 (etc for however many ports you want to run on a single server)
  7. pm2 startup (Gets startup script - run the result in terminal)
  8. pm2 save

Stop app from auto running on ec2 startup:

  1. pm2 unstartup systemv

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published