mattfite / chat-demo

A simple serverless chat demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A simple serverless chat application

This is a living project built to demonstrate serverless concepts

Configure

Create a file named credentials.json from the template, and fill in all the secret info. You'll have to get this from Matt.

cp credentials-template.json credentials.json

Develop

To develop, install dependencies with NPM and launch webpack dev server:

npm install
npm run webpack-serve

The app is accessible at localhost:3000. The files are automatically recompiled and served from memory as the contents change.

Test

There are no tests at the moment, but there is static code analysis, using eslint. To check your code for issues, run the following command:

npm run lint

Build

Build static files in the public directory with NPM:

npm install
npm run build

Deploy

After building, you can host the root directory somewhere, like Amazon S3

npm run deploy

This will copy the contents of the public/ directory to s3://chat-demo. In order to work, you must:

  • Have aws cli setup in your path
  • Have your AWS cli credentials properly configured
  • Have R/W access to the s3://chat-demo bucket

References

About

A simple serverless chat demo


Languages

Language:JavaScript 71.2%Language:HTML 27.1%Language:CSS 1.7%