diff --git a/.gitignore b/.gitignore index 301c4f2..43ddd2f 100644 --- a/.gitignore +++ b/.gitignore @@ -136,4 +136,4 @@ dist .pnp.* -container-data \ No newline at end of file +tests-results/ \ No newline at end of file diff --git a/README.md b/README.md index b9f0adf..9b9208e 100644 --- a/README.md +++ b/README.md @@ -2,18 +2,28 @@ A joke application. -## How to set up +## How to set up dev environment -Note: I'm assuming you're running Ubuntu 22.04. +* Pre-requisites + + `docker` and `docker compose` + + `node` and `npm` +* Run `npm install` +* You can now start the app in a container by running `npm run start:containers` (and shut it down with `npm run stop:containers`). -* Get nodejs and npm ready - - Run `sudo apt update` and `sudo apt install nodejs`. Check that worked with `node -v`. - - Run `sudo apt install npm`. Check that worked with `npm -v`. -* Init an npm project: `npm init -y` -* Modify `package.json`: you might want to add dependencies. -* Potentially add a `start script`. +## How to test -## How to run +* Run `npm run test` -* You can get the dev containers up and running with `npm run start:containers`. You can visit the app at `localhost`. -* If you would rather only run the express app locally, you can just do `npm run start` instead. +## How to deploy + +The app has never been deployed in production, so there's a lot of things to polish. + +The (hypothetical) approach is to: +* Spin up a linux box. +* Install node, caddy and postgres. +* Configure them all nice and stuff so they work together and have a reasonable production set up. +* Set up the node app with systemd so it runs proper. + +## Other + +* You can format with `npm run format` and lint with `npm run lint`. diff --git a/test-results/.last-run.json b/test-results/.last-run.json deleted file mode 100644 index cbcc1fb..0000000 --- a/test-results/.last-run.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "status": "passed", - "failedTests": [] -} \ No newline at end of file