Skip to content

RileCraft/ExpressAPI-Handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Features

  • Easier management of all APIs at once.
  • Better and organized format for your Endpoints.
  • Easy to customize.
  • All brackets and things labelled for easier modification.

Setup / Configuration

Edit the config.json file and fill the contents of it.

  • port: The port at which your server will be hosted on.
  • rateLimit: The time (in ms) in which the maxRequests option will be initiated.
  • maxRequests: The maximum number of requests allowed in the set time of rateLimit.
  • errorMessage: The message which will be displayed when the user reached ratelimit on the API.

Format of Endpoints

module.exports = {
name: "Meme", // Name of the API. Not really needed but you can keep it.
url: "/fun/meme", // The url at which the API will be accessable. Eg: https://localhost/fun/meme
run: async(req, res) => {

hdbdbdbdbhd // Enter your code.
	
	}
	     }

Releases

No releases published

Packages

No packages published