https://github.com/floscodes/rapid
A small framework for building webapps in Go inspired by Python Django.
https://github.com/floscodes/rapid
backend-development backend-webdevelopment development go golang web
Last synced: about 1 month ago
JSON representation
A small framework for building webapps in Go inspired by Python Django.
- Host: GitHub
- URL: https://github.com/floscodes/rapid
- Owner: floscodes
- License: bsd-3-clause
- Created: 2021-06-13T15:50:35.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-19T12:21:23.000Z (almost 2 years ago)
- Last Synced: 2026-01-02T12:31:28.685Z (6 months ago)
- Topics: backend-development, backend-webdevelopment, development, go, golang, web
- Language: Go
- Homepage:
- Size: 43 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Golang-rapid
Golang-rapid accelerates the process of building a small web service im Golang.
(it is inspired by the Python-Framework Django)
***Before use make sure that Go is installed on your computer***
### Build from source:
1.) Download the Code as a ZIP-File. Unpack it, and open the folder in the command line. Then type
```
go build
```
2.) Move the compiled binary to your default bin-folder so that you can use it just by typing ```rapid``` in the shell.
### Creating a new app:
For creating a new app use the following command:
```
rapid new YOUR_APP_NAME
```
Golang-rapid will create a new project-folder with your app’s source files:
* router.go - here you can set your http-paths and link them to a function that handles the request
* handlers.go - here you can define the functions that handle the requests
* main.go - this file contains the main-function where the server is being started and where you can set the port your app will listen to
### Building the app:
To compile your webapp use the following command:
```
rapid make
```
Golang-rapidapp will create a new subfolder that contains the compiled executable and all the other files and subfolders of your project-folder except the .go-files.
### Cross-compiling:
If you want to cross-compile your app first use ```go build``` to set your preferred environment variables, e.g.
```
env GOOS=linux GOARCH=arm go build
```
An executable will be putted in your project-folder.
Then use
```
rapid make
```
Golang-rapid will find your cross-compiled binary automatically and copy it to the new app folder without overwriting the existing cross-compiled executable.
### Info:
Golang-rapid uses the following repo to manage the routing of requests: [github.com/bouk/httprouter](https://github.com/bouk/httprouter/)