fca-utils
Advanced tools
Comparing version 0.0.3 to 0.0.4
import { Express } from 'express'; | ||
export default function createHttpsServer(port: number, app?: Express): void; | ||
export default function createHttpServer(port: number, app?: Express): void; | ||
//# sourceMappingURL=server.d.ts.map |
import express from 'express'; | ||
import https from 'https'; | ||
import http from 'http'; | ||
import cors from 'cors'; | ||
import helmet from 'helmet'; | ||
import rateLimit from 'express-rate-limit'; | ||
export default function createHttpsServer(port, app) { | ||
export default function createHttpServer(port, app) { | ||
let tServer = null; | ||
if (app) { | ||
tServer = https.createServer(app); | ||
tServer = http.createServer(app); | ||
} | ||
@@ -21,3 +21,6 @@ else { | ||
})); | ||
tServer = https.createServer(app); | ||
app.get('/', (req, res) => { | ||
res.send('Made with fca-utils 💖'); | ||
}); | ||
tServer = http.createServer(app); | ||
} | ||
@@ -24,0 +27,0 @@ tServer.listen(port, () => { |
{ | ||
"name": "fca-utils", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A NodeJS package to help interacting with Facebook Messenger API (fca-unofficial)", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -70,3 +70,3 @@ # BETA VERSION | ||
<details><summary><h3 style="display: inline">Screenshot<h3></summary> | ||
<details><summary>Screenshot</summary> | ||
@@ -106,3 +106,3 @@ ![message_demo](https://i.ibb.co/9rvPFRQ/image-2023-03-27-010100006.png) | ||
<details><summary><h3 style="display: inline">Screenshot<h3></summary> | ||
<details><summary>Screenshot</summary> | ||
@@ -109,0 +109,0 @@ ![message_demo](https://i.ibb.co/9sMCHyX/image-2023-03-27-010125613.png) |
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
20133
268