diff --git a/README.md b/README.md new file mode 100644 index 0000000..f9618e4 --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +# Intermediate starter for express _javascript_ apps + +This is an intermediate starter template for express apps written in JavaScript (not TypeScript). + +It does not use express router. + +## Change this README.md file! + +If you have used this project as a template, remember to change this readme file to add your own documentation and remove anything you don't need. + +## Features + +- EJS template setup with express +- connection-pool setup for node-postgres +- loads DATABASE_URL from env variable. (And tries to load .env files with dotenv) +- static file serving from `/public` +- favicon +- demo of classless css framework +- automated testing with jest +- example jest test +- formatting with prettier +- linting with eslint +- live-reload: in development mode, when viewing an html page, if a file is changed and saved, the browser will make the request again. This won't work if the browser is viewing a json output - it needs to be an html page so that live-reload can insert a javascript fragment into it. +- .gitignore + +## Installation + +Install dependencies + +`yarn` + +## Configuration on dev machine + +Copy `.env.example` to `.env` and set DATABASE_URL to your database's connection string. + +## Running + +Run (in dev mode with live-reload): +`yarn start:dev` + +Run (for production with no live-reload) +`yarn start`