@larner.dev/perk-db
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Perk

import { server } from "perk";

server({
	rootDirectory: __dirname,
	routes: {
		directory: "./routes",
		excludeRegex: ".*\\.test\\.ts$",
	},
	server: {
		url: "https://api.mywebsite.com",
		port: 3001,
		cors: {},
	},
})
	.then(() => {
		console.log(`Server started on port 3001`);
	})
	.catch((error: Error) => {
		console.error("The server couldn't start up...");
		console.error(error.message);
	});

process.once("SIGUSR2", async function () {
	process.kill(process.pid, "SIGUSR2");
});

Readme

Keywords

none

Package Sidebar

Install

npm i @larner.dev/perk-db

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

43.5 kB

Total Files

17

Last publish

Collaborators

  • alarner