Open-source blogging platform
Merely install dependencies and run the application using npm start. The start command will compile and bundle all necessary assets, set up file watchers, as well as nodemon and browser-sync so that you're able to continuously develop.
npm install
npm startFirst off you'll need to download and install the awscli tool.
pip install awscliThen configure it with your AWS credentials. Make sure to leave the default JSON format output as-is.
aws configureYou'll probably want to create an instance on EC2. The command below will spin up a new instance, give it an IP address, and set it up for node and nginx. Note that the database server must be hosted separately. For this purpose I chose MongoLab as my DBaaS provider of choice, the free tier would typically suffice.
npm run launchConfigure it with it's private environment variables, which you should place in an .env file in the application root. The command below will push the .env file via rsync to the server and restart it, so make sure you only update environment variables when necessary.
npm run configureWhenever you want to deploy, use the command below. It'll bump the version by a single patch digit and add the '-$ENV' string, for instance if you were working on 1.2.3, a deployed version could become 1.2.4-staging. Uploading occurs via rsync, and then nginx and pm2 are hot-reloaded.
npm run deployIf you run into trouble, you can ssh into the instance and ammend the situation by yourself.
npm run sshMIT