https://github.com/reddec/mpa-gen
Generates directories and files for multi-page site with backend on Go (gin)
https://github.com/reddec/mpa-gen
golang python python3 site-generator
Last synced: about 1 month ago
JSON representation
Generates directories and files for multi-page site with backend on Go (gin)
- Host: GitHub
- URL: https://github.com/reddec/mpa-gen
- Owner: reddec
- License: apache-2.0
- Created: 2019-10-02T04:44:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-02T05:20:29.000Z (over 6 years ago)
- Last Synced: 2025-03-09T00:06:39.222Z (over 1 year ago)
- Topics: golang, python, python3, site-generator
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mpa-gen
[](https://badge.fury.io/py/mpa-gen)
[](https://github.com/reddec/mpa-gen/blob/master/LICENSE)
Generates directories and files for multi-page
site with backend on Go (gin).
Generates:
- layouts
- views (page templates)
- controller stub with in/out params parsing
- utils for bootstrap
Requirements:
- Jinja2
- Python3.4+ (actually could run even on lower version but I didn't test)
## Installation
`pip install mpa-gen`
## Quick start from scratch
1. Create empty directory and go into it
2. Install latest mpa-gen `pip3 install --upgrade --user mpa-gen`
3. Initialize go project `go mod init myproject`
4. Generate site structure `mpa-gen portal main`

## Usage
```
usage: mpa-gen [-h] [--dir DIR] [--method METHOD] section name
multi-page site generator
positional arguments:
section Section name (ex: user/messages)
name Resource name (ex: dialog)
optional arguments:
-h, --help show this help message and exit
--dir DIR Root directory
--method METHOD HTTP method: GET or POST
```
- default method: `GET`
- default directory: current working dir