Struct spot::Spot [−][src]
pub struct Spot { /* fields omitted */ }
Implementations
Returns a Spot HTTP server instance with worker threads equal to the specified amount.
#Panics
panics if amount of threads is 0
Add middleware for specified resources.
The middleware function takes inn a function that returns a modified response and request, aswell as a boolean is true if the request should be forwarded or false if you wish the server to write the current response.
Add a http resource route which takes in the request and a premade respons, then returns a modifed response that is written to the client
Add a file to routes, it’s route is equal to the path where the file lies
Make all the files in the specified directory publicly avalible