Skip to content

Commit

Permalink
Merge pull request #251 from DadiBit/feat-express-function-export
Browse files Browse the repository at this point in the history
feat: express-like function call
  • Loading branch information
kartikk221 authored May 1, 2024
2 parents 0024218 + a463e0a commit 20cee64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ module.exports = {
Server,
Router,
compressors: uWebsockets,
express(...args) { return new Server(...args); },
};
5 changes: 4 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ export * from './components/middleware/MiddlewareNext';
export * from './components/plugins/LiveFile'
export * from './components/plugins/MultipartField'
export * from './components/plugins/SSEventStream'
export * from './components/ws/Websocket'
export * from './components/ws/Websocket'

import { Server } from './components/Server';
export const express: (...args: ConstructorParameters<typeof Server>) => Server;

0 comments on commit 20cee64

Please sign in to comment.