Skip to content

citizenfx/http-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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());

About

A HTTP wrapper for Node.js usage in CitizenFX.

Resources

Stars

Watchers

Forks

Packages

No packages published