Re:Rust is a hard way to make a web API
by joshxyz on Saturday January 16, 2021 @12:51AM
(#25800397)
My codes are written on JS but the sensitive parts are heavily commented with TS types so my vscode intellisense could assist me with correct types.
/*
* @type {Map<String, Number>}
*/
const map = new Map();
Like that.
Express JS is still shit, koajs and fastify are a little better, I used to use nodejs's internal http and https libraries directly but these days uwebsockets.js is what you'd want since it's mature enough already (used by top crypto exchanges).
/* * @type {Map<String, Number>} */
const map = new Map();
Like that.
Express JS is still shit, koajs and fastify are a little better, I used to use nodejs's internal http and https libraries directly but these days uwebsockets.js is what you'd want since it's mature enough already (used by top crypto exchanges).
https://github.com/uNetworking/uWebSockets.js/
And oh it comes with TS types which are cool.