All Projects → Kripth → lighttp

Kripth / lighttp

Licence: MIT License
Lightweight asynchronous HTTP/WS client/server

Programming Languages

d
599 projects
HTML
75241 projects

Projects that are alternatives of or similar to lighttp

Simple Websocket Server
A very simple, fast, multithreaded, platform independent WebSocket (WS) and WebSocket Secure (WSS) server and client library implemented using C++11, Boost.Asio and OpenSSL. Created to be an easy way to make WebSocket endpoints in C++.
Stars: ✭ 685 (+3013.64%)
Mutual labels:  client, ws
Clusterws Client Js
🔥 JavaScript Client for ClusterWS - lightweight, fast and powerful framework for building scalable WebSocket applications in Node.js.
Stars: ✭ 120 (+445.45%)
Mutual labels:  client, ws
electron-request
Zero-dependency, Lightweight HTTP request client for Electron or Node.js
Stars: ✭ 45 (+104.55%)
Mutual labels:  lightweight, client
rails5-docker-alpine
Lightweight Docker development environment for Rails using Alpine Linux
Stars: ✭ 71 (+222.73%)
Mutual labels:  lightweight
matterless
Self-hosted serverless
Stars: ✭ 23 (+4.55%)
Mutual labels:  lightweight
AsyncWebSocketClient
php异步websocket客户端
Stars: ✭ 35 (+59.09%)
Mutual labels:  client
geektime-desktop
极客时间桌面版 for macOS/Windows/Debian
Stars: ✭ 94 (+327.27%)
Mutual labels:  client
tdme2
TDME2 - ThreeDeeMiniEngine2 is a lightweight, multi-platform 3D engine including tools suited for 3D game/application development using C++
Stars: ✭ 86 (+290.91%)
Mutual labels:  lightweight
typeform-python-sdk
Typeform Python API client
Stars: ✭ 41 (+86.36%)
Mutual labels:  client
brisk-ioc
fast light brisk ioc/di container on nodejs; Node下快速 轻量的IoC/DI容器,依赖注入,配合装饰器使用
Stars: ✭ 12 (-45.45%)
Mutual labels:  lightweight
LongUI
Lightweight C++ GUI Library 轻量级C++图形界面库
Stars: ✭ 149 (+577.27%)
Mutual labels:  lightweight
picamera-motion
Raspberry Pi python PiCamera Lightweight Motion Detection. Includes easy curl script install/upgrade, whiptail admin menu system, single file web server and Rclone for uploading to a variety of web storage services.
Stars: ✭ 80 (+263.64%)
Mutual labels:  lightweight
haste-client
CLI client for haste-server (hastebin.com) written in Python
Stars: ✭ 13 (-40.91%)
Mutual labels:  client
zoom
Lightweight (8 Kb) ES5 javascript plugin without any dependencies, compatible with desktop and mobile devices.
Stars: ✭ 25 (+13.64%)
Mutual labels:  lightweight
jsonlint
Lightweight command-line tool for validating JSON
Stars: ✭ 27 (+22.73%)
Mutual labels:  lightweight
datagoose
🔐 Easy to use, fast, lightweight, secure, JSON based database for Python!
Stars: ✭ 13 (-40.91%)
Mutual labels:  lightweight
ofxgo
Golang library for querying and parsing OFX
Stars: ✭ 96 (+336.36%)
Mutual labels:  client
metal
Lightweight Erlang server behaviour
Stars: ✭ 15 (-31.82%)
Mutual labels:  lightweight
echo-server
Echo Server is a container-ready, multi-scalable Node.js application used to host your own Socket.IO server for Laravel Broadcasting.
Stars: ✭ 36 (+63.64%)
Mutual labels:  ws
mentos
Fresh Python Mesos Scheduler and Executor driver
Stars: ✭ 18 (-18.18%)
Mutual labels:  client

lighttp Logo

DUB Package Build Status

Lighttp is a lightweight asynchronous HTTP and WebSocket server library for the D programming language with simple API.

import std.file;

import lighttp;

void main(string[] args) {

	Server server = new Server();
	server.host("0.0.0.0");
	server.host("::");
	server.router.add(new Router());
	server.router.add(Get("welcome"), new Resource("text/html", read("welcome.html")));
	server.run();

}

class Router {

	// GET /
	@Get("") getIndex(ServerResponse response) {
		response.body = "Welcome to lighttp!";
	}
	
	// GET /image/uhDUnsj => imageId = "uhDUnsj"
	@Get("image", "([a-zA-Z0-9]{7})") getImage(ServerResponse response, string imageId) {
		if(exists("images/" ~ imageId)) {
			response.contentType = MimeTypes.jpeg;
			response.body = read("images/" ~ imageId);
		} else {
			response.status = StatusCodes.notFound;
		}
	}

}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].