Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 413 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 413 Bytes

http-wrapper

A quick HTTP wrapper for CitizenFX servers. Can't be used with Express yet as it directly relies on http from Node.js, use Koa/similar instead.

Usage

const { setHttpCallback } = require('@citizenfx/http-wrapper');
const Koa = require('koa');

const app = new Koa();
app.use(async ctx => {
	ctx.body = 'Hello World!'
});

// instead of app.listen()
setHttpCallback(app.callback());