Launch your server
With Node HTTP​
Example​
server.tsts
import {initBridge ,handler } from 'bridge';Âconsthello =handler ({resolve : () => 'hello',});Âconstbridge =initBridge ({routes : {hello } });Âconstport = 8080;Âbridge .HTTPServer ().listen (port , () => {`Listening on port ${port }`;});
server.tsts
import {initBridge ,handler } from 'bridge';Âconsthello =handler ({resolve : () => 'hello',});Âconstbridge =initBridge ({routes : {hello } });Âconstport = 8080;Âbridge .HTTPServer ().listen (port , () => {`Listening on port ${port }`;});
With Express​
Install express​
terminalbash
npm i expressnpm i --save-dev @types/express
terminalbash
npm i expressnpm i --save-dev @types/express
Example​
server.tsts
import {initBridge ,handler } from 'bridge';importexpress from 'express';Âconsthello =handler ({resolve : () => 'hello',});Âconstbridge =initBridge ({routes : {hello } });Âconstport = 8080;Âconstapp =express ();Âapp .use ('',bridge .expressMiddleware ());Âapp .listen (port , () => {`Listening on port ${port }`;});
server.tsts
import {initBridge ,handler } from 'bridge';importexpress from 'express';Âconsthello =handler ({resolve : () => 'hello',});Âconstbridge =initBridge ({routes : {hello } });Âconstport = 8080;Âconstapp =express ();Âapp .use ('',bridge .expressMiddleware ());Âapp .listen (port , () => {`Listening on port ${port }`;});
With Fastify​
Coming soon...
Lambda​
Coming soon...