-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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` |