tydet-core-express
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

TyDeT Core Express

TyDeT Core Express is a Typescript & Javascript library for TyDeT Core to handle HTTP requests using Express JS.

TyDeT (Typescript Developer Tools) Core Express is a module for TyDeT Core to handle log HTTP requests for a web server app using Express JS.

Installation

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

npm install tydet-core tydet-core-express

It is required to install TyDeT Core to use this module.

Usage

Basic usage

import { Context } from 'tydet-core';
import { Express, RequestExtended, SuccessResponse } from 'tydet-core-express';

let router = express.Router()
router.get("/test", async (req: RequestExtended, res: express.Response) => {
  return res.json(SuccessResponse(req, {ok: 1}, "Ok!"))
})

let app = new Context()
let express = new Express({host: 'localhost', port: 3000}, [router])
await app.mountService("express", express)

Check the docs for more details about the service.

Changelog

Learn about the latest improvements.

License

MIT License.

Contributing

We'd love for you to contribute to TyAPI Core Express and help make it even better than it is today! Find out how you can contribute here.

Package Sidebar

Install

npm i tydet-core-express

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

41.6 kB

Total Files

17

Last publish

Collaborators

  • kabany