Classes
Methods
-
<async, static> connectDB( uri )
-
Description
Connect to a Mongodb database.Parameters
Name Type Description uri
string MongoDB connection string/URI Examples
const { connectDB } = require("emfrest")
connectDB(MONGODB_URI)
Details
-
<static> handlePromiseRejections( server )
-
Description
Function to handle promise rejections.Parameters
Name Type Description server
Http2Server Server instance returned by the Express app.listen() method. Examples
const { handlePromiseRejections } = require("emfrest")
handlePromiseRejections(server)
Details