a bit of cleaning
This commit is contained in:
parent
1c95c2251d
commit
b57237f72b
3 changed files with 22 additions and 16 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -136,4 +136,4 @@ dist
|
|||
.pnp.*
|
||||
|
||||
|
||||
container-data
|
||||
tests-results/
|
||||
32
README.md
32
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`.
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"status": "passed",
|
||||
"failedTests": []
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue