A C++ backend framework designed for web applications. A few features include:
- Simple and easy to use API ✨
- Built-in HTTP server 🌐
- Out of the box multi-threading support 🧵
- Expandable custom middleware 🧩
It is pretty straightforward and if you are familiar with the Express.js framework, you will feel right at home, as the API is very similar, which is my goal? 🎯
Install g++
sudo apt install g++
Install clang
sudo apt install clang
- Install the make utilities to build the binary:
sudo apt install cmake make
- Clone the repository:
git clone [email protected]:coding-cpp/expresso.git
- Clone the submodules:
cd expresso
git submodule init
git submodule update
-
Make a
.env
file in the root directory of the project and add the environment variables present in the.env.sample
file in it. -
Build the project:
mkdir build && cd build
cmake ..
make
- Run the server:
./server
You can find an example of how to use the framework in the example
directory.
You can also run the server using Docker. Make sure you have Docker installed on your system.
- Build the Docker image:
docker build -f docker/build.dockerfile -t expresso .
- Run the Docker container:
docker run -p 8000:8000 -e PORT=8000 expresso
Alternatively, you can use the pre-built Docker image from Docker Hub (supports both amd64 and arm64 architectures):
docker run -p 8000:8000 -e PORT=8000 jadit19/expresso:latest
If you prefer to use Docker Compose, you can use the provided docker compose file and run it using the following command:
docker compose -f docker/compose.yaml up
If you would like to contribute to the project, feel free to fork the repository and submit a pull request. I am always open to new ideas and suggestions. 🚀
If you encounter any bugs or issues, feel free to open an issue on the repository. This is a work in progress and since I am the only one working on it, that too in my spare time, I might not have the time to fix it right away, but I will try my best to get to it as soon as possible. 🐛🔧