techiediaries /
django-crm
A Simple Django CRM (Customer Relationship Management) RESTful API Project
Loading repository data…
PedroFnseca / repository
A simple RESTful API built in C for lightweight and fast web servers.
This project implements a RESTful web server in C, leveraging the libmicrohttpd library. libmicrohttpd is a lightweight, designed for simplicity and efficiency, making it an excellent choice for building low-level web servers.
The server handles HTTP requests, manages routing, and interacts with a PostgreSQL database using the libpq library. It demonstrates core concepts such as:
For a deeper dive into the implementation, refer to the official libmicrohttpd manual, which provides a detailed example of a simple HTTP server.
The C programming language was chosen for this project due to its low-level capabilities, which provide fine-grained control over system resources and memory management. By implementing a RESTful web server in C, this project demonstrates how to handle HTTP requests, manage sockets, and interact with system libraries like libmicrohttpd and libpq for database connectivity.
C is particularly well-suited for this type of application because:
✏️ Note:: This project serves as a practical example of how to build a RESTful API in a language that is often overlooked for web development but remains foundational in systems programming.
This project uses a PostgreSQL database to store user information. The database is hosted on Supabase, a cloud-based platform that provides a fully managed PostgreSQL database. The server communicates with the database using the libpq library, which is the official C API for PostgreSQL.
The database consists of a single table named users, designed to store user data. Below is the schema for the users table:
| Column Name | Data Type | Description |
|---|---|---|
id | SERIAL | Unique identifier for each user. |
name | TEXT | The name of the user. |
email | TEXT | The email address of the user. |
Before running the server, ensure you have the following installed:
git clone https://github.com/PedroFnseca/rest-api-C.git
cd rest-api-C
pg.h file in the src directory.#define DB_HOST "your_database_host"
#define DB_NAME "your_database_name"
#define DB_USER "your_database_user"
#define DB_PASSWORD "your_database_password"
#define DB_PORT "your_database_port"
scripts:
cd scripts
./docker_run.sh
./compiler.sh --run
http://localhost:8080This RESTful web server provides the following endpoints.
Here are some articles I’ve written about this project:
Selected from shared topics, language and repository description—not editorial ratings.
techiediaries /
A Simple Django CRM (Customer Relationship Management) RESTful API Project
Chalarangelo /
A simple RESTful API implementation using PHP and CodeIgniter
fisayoafolayan /
A simple implementation on how to use a RESTful API in React.
SAP-archive /
A "Hello World" application for Cloud Foundry using a simple RESTful API in Node.js with persistency in PostgreSQL and SAPUI5 UIs.
jchristn /
RestWrapper is a simple C# class library to help simplify sending REST API requests and retrieving responses (RESTful HTTP and HTTPS)
newline-sandbox /
This project demonstrates a simple RESTful API built with Go and Chi.