update README
This commit is contained in:
parent
baa1705105
commit
e326df8b86
75
README.md
75
README.md
@ -1,32 +1,18 @@
|
||||
# CostaPy
|
||||
Python Web Framework. Build with Bottle and Mako.
|
||||
# CostaPy + Vite
|
||||
|
||||
## License
|
||||
|
||||
CostaPy
|
||||
|
||||
Copyright (C) 2022 Dita Aji Pratama
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
Integrate Costapy with Vite, Vue, Tailwind CSS, and Mynaui Icons to create a modern web application.
|
||||
|
||||
## Requirement & Installation
|
||||
|
||||
- Node.js (20+ recommended)
|
||||
- Python (3.8+ recommended)
|
||||
- pnpm (optional, you can use npm if preferred)
|
||||
|
||||
### Clone the repository
|
||||
|
||||
Clone the repository with `--recursive` when cloning the repo.
|
||||
|
||||
git clone https://gitea.ditaajipratama.net/aji/costapy.git --recursive
|
||||
git clone https://gitea.ditaajipratama.net/ridzimeko/costa-vite-myna.git --recursive
|
||||
|
||||
Note that if you forgot the `--recursive` flag you can do:
|
||||
|
||||
@ -39,6 +25,7 @@ Note that when submodules have other submodules you need recursive option.
|
||||
### Dependencies
|
||||
|
||||
You need this libraries to use CostaPy:
|
||||
|
||||
- bottle
|
||||
- gunicorn
|
||||
- beaker
|
||||
@ -48,24 +35,48 @@ You can install it with run this command
|
||||
|
||||
sh install.sh
|
||||
|
||||
Here is the completed command
|
||||
|
||||
sudo apt-get install -y python3-pip
|
||||
pip install --upgrade pip
|
||||
pip install bottle
|
||||
pip install gunicorn
|
||||
pip install beaker
|
||||
pip install mako
|
||||
|
||||
## Usage
|
||||
|
||||
1. Install Node.js Packages
|
||||
|
||||
Install the frontend dependencies using pnpm (or any package manager like npm or yarn):
|
||||
|
||||
pnpm install
|
||||
|
||||
Alternatively, with npm:
|
||||
|
||||
npm install
|
||||
|
||||
2. Build the Project
|
||||
|
||||
Build the Vite project for production:
|
||||
|
||||
pnpm build
|
||||
|
||||
This will generate the build files in the `static/vue` directory.
|
||||
|
||||
3. Run the Backend Server
|
||||
|
||||
Use this command to start the web service
|
||||
|
||||
python3 costa.py
|
||||
|
||||
You can use nohup too and running it in the background like this
|
||||
## Folder Structure
|
||||
|
||||
nohup python3 costa.py &
|
||||
```
|
||||
project/
|
||||
├── costa.py # Bottle backend script
|
||||
├── static/
|
||||
├── vue # Vite build output (generated after running pnpm build)
|
||||
├── src/ # Frontend source code
|
||||
│ ├── components/ # Vue components
|
||||
│ ├── assets/ # CSS, images, etc.
|
||||
│ ├── App.vue # Main Vue component
|
||||
│ └── main.js # Entry point for the Vue app
|
||||
├── package.json # Node.js dependencies
|
||||
├── tailwind.config.cjs # Tailwind CSS configuration
|
||||
└── ...
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user