app/views
contains the frontend (Vue application).app/config/db.config.js
is the config file for your database. The values here are taken from the.env
file which you will create in the root folder. See the.env.example
file.app/controllers
contains the functions for interacting with the database.app/models
contains all the database models.server.js
is the node server.book-adder
is the python server.
- Set up a local postgres database.
- Rename
.env.example
to.env
and add your credentials and values. Never edit .env.example or push the.env
file - Run
npm i
to install the node server - Run
npm run install-client
to install the Vue application.- The same as running
npm i
fromapp/views
.
- The same as running
- In
/book-adder
create a new venv and runpip install -r requirements.txt
- Make sure you have mysql running locally.
- Run
npm run server-only
to start the server. - Run
npm run client-only
to start the client.- This is the same as running
npm run dev
fromapp/views
- This is the same as running
- Run
npm run css
.- This will generate your css.
- With Tailwind you don't need to add any css, you simply add the predefined classes to your elements. See the Tailwind docs for available classes.
- Run
waitress-serve --port=3000 server:app
The client is now available at localhost:5173
.
The servers are available at:
- Node server
localhost:8080
. - Python server:
localhost:3000
To make the full application ready for production, from the root folder, run npm run server
. This will build the frontend and run everything from the server.
The full application is now available on localhost:8080
.