ServerKit

A Different Kind of Web Framework

for NodeJS

Learn More
Perfect for Microservices
Develop API Servers
Great for Prototyping




Start Developing with ServerKit



Install the latest package from NPM :
npm install --save @liquicode/serverkit
User ServerKit in your project :
const ServerKit = require( '@liquicode/serverkit' );
let server = ServerKit.NewServer( 'MyServer', __dirname, server_options );
await server.Initialize();
await server.Startup();


Deploy with the ServerKit Docker Image

docker run --mount type=bind,source=~/MyServer,target=/server agbowlin/serverkit




ServerKit Features



Built-In User Management and Authentication

 

Supports Http/Https and WebSockets


Ships with AMQP Support: Use Message Queues

 

Based on Express and Supports Plugins


Command Line to Invoke Services and Build Scripts

 

Management UI for Users and Services





No Complex Plumbing

Define Your Services in Javascript



Create an options file for your server:

// MyServer/SimpleService.options.json
module.exports = {
	services_path: 'SmallestService.js'
};

Author your service file:

// MyServer/SimpleService.js
exports.Construct =
	function Construct( Server )
	{
		// Define the service.
		let service = Server.NewApplicationService(
			// Service Definition
			{
				name: 'SmallestService',
				title: 'Smallest Service',
				description: 'This is the smallest service.',
			},
			// Configuration Defaults
			{
				answer: 42,
			} );
 
		// Define the service function.
		service.Origins.SimpleFunction =
			Server.NewOriginDefinition(
				{
					name: 'SimpleFunction',
				},
				function () { return 'The answer is: ' + service.Settings.answer; }
			);
 
		// Return the service back to ServerKit.
		return service;
	};

Call your Service Function from the command line:

cd MyServer
npx @liquicode/serverkit call SmallestService.SimpleFunction
  The answer is: 42

Or from the web:

curl localhost:8080/SmallestService.SimpleFunction
  The answer is: 42





By Liquicode