Vape (is a Work in Progress)
The functional web micro-framework!
What does it do?
It helps you structure your code into units that handle HTTP web requests.
Each of these are called
Why would you want to do that?
This structure opens up some opportunities. Individual
Okay, but that leaves a lot for me to do.
That is not a question, but yes. Vape will try to bring all the tools together
to help you route handlers, develop locally and compile
git clone https://github.com/vlang/v cd v make sudo ./v symlink
Vape is packaged as a V module for now, so you can install it with:
v install exastencil.vape
This will clone the repository into
This repository contains library code needed to compile Vape apps and a command line utility to help you build and run them.
Install the CLI
First you need to build it:
This will build the executable at
I'd recommend moving it onto your path with something like:
mv ~/.vmodules/exastencil/vape/commands/vape /usr/local/bin
To test that the CLI is working try
Start a project
To start a new project simply create an empty folder and execute
This sets up a basic file structure and a sample handler to get you started.
Add as many endpoints as you need.
To run the all endpoints in a web server in your local environment run
➜ vape dev 🔪 Dissecting handlers… ↜ endpoints/hello.v 🧠 Compiling development server… 🚀 Launching development server on port 6789… Ctrl + C to exit.
- Dynamic routing for local development
- Named route parameters and query parameters
- Host context
- Standardized logging
- Built-in benchmarking
- Hot code reloading for local development
- Individual endpoint compilation
- Build checksums
And some longer term, bigger picture features…
- Deployment helper as in
- Entity persistence
- Scheduled handlers (cron-like handlers)
- Messaging handlers (e.g. email)
Vape is made possible by the
Vape is a side-project to which very little time is dedicated. The best way to support Vape is to support V.