Couple of days ago I released npmjs.com/kizma. It is a package, that wraps around regular typescript functions to create rest api backend and generated frontend. Right now it only supports strings and numbers as function parameters.
So this works:
function okay(id: number, text: string) {
//…
}
And this wouldn’t:
function unsupported(credentials: Object, user: TUserData) {
//…
}
However, assigning string/number to type would work:
type TUserData = string
function stillOkay(user: TUserData) {
//…
}
You pull all your files into api/ folder
- Initialize with npm init, if you haven’t already
- install kizma npm i -D kizma
- run npm exec kizma
- run node server.cjs
- Go to localhost:8080/{filename}.html
To do what?
“I honestly don’t know” - Ryan Gosling
Well, this would save you little time, your project will be more understandable, organized by file-based routing. You would not have to worry about serialization, performance, security. Kizma takes some load off.
It is great for prototyping. No special setup needed to go from test.ts to fully functional application.
It can be used for internal apps.