Update README.md

This commit is contained in:
originalmk 2023-03-18 10:45:29 +01:00 committed by GitHub
parent 7fb77856d6
commit 255f5252ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,9 +11,9 @@ To start this application you need to:
- Install PostgreSQL DBMS - Install PostgreSQL DBMS
- Setup some database and user with permissions to it - Setup some database and user with permissions to it
- Create .env file in the main directory and fill it in with fields DB_USER, DB_PASS, DB_HOST, DB_PORT, DB_NAME and COOKIE_SECRET. In case of confusion you may check exemplary .env file saved as .env.example in the root directory of this repository. - Create .env file in the main directory and fill it in with fields DB_USER, DB_PASS, DB_HOST, DB_PORT, DB_NAME and COOKIE_SECRET. In case of confusion you may check exemplary .env file saved as .env.example in the root directory of this repository.
3. Run SQL migrations. To do that you should have knex installed globally (npm install knex -g) and then execute `knex migrate:latest` in the root directory. For app to be usable it is also recommended to insert some data to the database. 3. Run `npm install` in the main directory.
4. Run SQL migrations. To do that you should have knex installed globally too (npm install knex -g) and then execute `knex migrate:latest` in the root directory. For app to be usable it is also recommended to insert some data to the database.
- Note: Images should be added in media/images directory and image paths inserted into database should only contain part starting with images/ for example image may be uploaded at media/images/wozLEFT.webp and path in database should be images/wozLEFT.webp. - Note: Images should be added in media/images directory and image paths inserted into database should only contain part starting with images/ for example image may be uploaded at media/images/wozLEFT.webp and path in database should be images/wozLEFT.webp.
4. Run `npm install` in the main directory.
5. Run `npm install` in the client directory. 5. Run `npm install` in the client directory.
6. Run `npm build` in the client directory. 6. Run `npm build` in the client directory.
- You need to do this after every update of app's frontend (you can do it every time you pull new version of this app). - You need to do this after every update of app's frontend (you can do it every time you pull new version of this app).
@ -26,6 +26,6 @@ Note: pm2 or/and nginx may be used to run this app for production
1. Stop the app. Execute `pm2 stop <your-app-name>` if you use pm2. 1. Stop the app. Execute `pm2 stop <your-app-name>` if you use pm2.
2. Use `git pull` to get latest changes. 2. Use `git pull` to get latest changes.
3. Run `knex migrate:latest` in the root directory. Remember you need to have knex installed globally to do that. 3. Run `knex migrate:latest` in the root directory. Remember you need to have knex installed both globally and locally (it is in package.json so if you run `npm install` you will have it installed) to do that.
4. Go to client directory and enter `npm build`. 4. Go to client directory and enter `npm build`.
5. Start the app. If you use pm2, exectue `pm2 start <your-app-name>`. 5. Start the app. If you use pm2, exectue `pm2 start <your-app-name>`.