57 lines
2.8 KiB
Markdown
57 lines
2.8 KiB
Markdown
|
|
#So u have to make a better website than this plus change the pictures that's ai and replace them with real ones he is a barber and i'm making him a website his IG: https://www.instagram.com/klip_hos_kawa/ and with this link u have to make it look like a barberstyle i like this style also which i have currently and i want from you to make it look like claude fable 5 and make like animations good graphics https://preview--kawa-cuts-showcase.lovable.app/ - template backend,
|
|
|
|
#### Run App on local machine:
|
|
|
|
##### Install local dependencies:
|
|
- `yarn install`
|
|
|
|
------------
|
|
|
|
##### Adjust local db:
|
|
###### 1. Install postgres:
|
|
- MacOS:
|
|
- `brew install postgres`
|
|
|
|
- Ubuntu:
|
|
- `sudo apt update`
|
|
- `sudo apt install postgresql postgresql-contrib`
|
|
|
|
###### 2. Create db and admin user:
|
|
- Before run and test connection, make sure you have created a database as described in the above configuration. You can use the `psql` command to create a user and database.
|
|
- `psql postgres --u postgres`
|
|
|
|
- Next, type this command for creating a new user with password then give access for creating the database.
|
|
- `postgres-# CREATE ROLE admin WITH LOGIN PASSWORD 'admin_pass';`
|
|
- `postgres-# ALTER ROLE admin CREATEDB;`
|
|
|
|
- Quit `psql` then log in again using the new user that previously created.
|
|
- `postgres-# \q`
|
|
- `psql postgres -U admin`
|
|
|
|
- Type this command to creating a new database.
|
|
- `postgres=> CREATE DATABASE db_so_u_have_to_make_a_better_website_than_this_plus_change_the_pictures_that_s_ai_and_replace_them_with_real_ones_he_is_a_barber_and_i_m_making_him_a_website_his_ig__https___www_instagram_com_klip_hos_kawa__and_with_this_link_u_have_to_make_it_look_like_a_barberstyle_i_like_this_style_also_which_i_have_currently_and_i_want_from_you_to_make_it_look_like_claude_fable_5_and_make_like_animations_good_graphics_https___preview__kawa_cuts_showcase_lovable_app_;`
|
|
|
|
- Then give that new user privileges to the new database then quit the `psql`.
|
|
- `postgres=> GRANT ALL PRIVILEGES ON DATABASE db_so_u_have_to_make_a_better_website_than_this_plus_change_the_pictures_that_s_ai_and_replace_them_with_real_ones_he_is_a_barber_and_i_m_making_him_a_website_his_ig__https___www_instagram_com_klip_hos_kawa__and_with_this_link_u_have_to_make_it_look_like_a_barberstyle_i_like_this_style_also_which_i_have_currently_and_i_want_from_you_to_make_it_look_like_claude_fable_5_and_make_like_animations_good_graphics_https___preview__kawa_cuts_showcase_lovable_app_ TO admin;`
|
|
- `postgres=> \q`
|
|
|
|
------------
|
|
|
|
#### Api Documentation (Swagger)
|
|
|
|
http://localhost:8080/api-docs (local host)
|
|
|
|
http://host_name/api-docs
|
|
|
|
------------
|
|
|
|
##### Setup database tables or update after schema change
|
|
- `yarn db:migrate`
|
|
|
|
##### Seed the initial data (admin accounts, relevant for the first setup):
|
|
- `yarn db:seed`
|
|
|
|
##### Start build:
|
|
- `yarn start`
|