Start on Heroku: Node.js

by ratewar


A S3 Image Uploader

A barebones Node.js app using Express 4.


Make sure you have Node.js and the Heroku CLI installed. Make sure you have account on Heroku An AWS S3 bucket has been created; You have AWS authentication keys that have write access to the bucket. You have enabled CORS (Cross-Origin Resource Sharing) on the bucket so that this application can store files in S3 and browser does not have issues

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="">

Running Locally

$ git clone # or clone your own fork
$ cd uploadimages
$ npm install
$ npm start

Your app should now be running on localhost:5000.

Deploying to Heroku

$ heroku login
$ heroku create
$ git push heroku master
$ heroku ps:scale web=1
$ heroku config:set AWS_ACCESS_KEY_ID=xxx AWS_SECRET_ACCESS_KEY=yyy
$ heroku config:set S3_BUCKET=zzz
$ heroku open


Deploy to Heroku and go to setting tab and make sure you add environmet variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and S3_BUCKET