1 module vibrant.d; 2 3 public import vibe.d; 4 5 public import vibrant.helper; 6 public import vibrant.parameter; 7 public import vibrant.router; 8 public import vibrant.routes; 9 10 /++ 11 + Starts a vibrant router on port 8085. 12 + 13 + Params: 14 + prefix = The route prefix for all routes. 15 + 16 + Returns: 17 + An instance of the vibrant router. 18 ++/ 19 VibrantRouter!GenerateAll Vibrant(bool GenerateAll = false)( 20 string prefix = null) { 21 return Vibrant!GenerateAll(8085u, prefix); 22 } 23 24 /++ 25 + Starts a vibrant router on the given port. 26 + Defaults to port 8085 if none is provided. 27 + 28 + Params: 29 + port = The port number to start the server on. 30 + prefix = The route prefix for all routes. 31 + 32 + Returns: 33 + An instance of the vibrant router. 34 ++/ 35 VibrantRouter!GenerateAll Vibrant(bool GenerateAll = false)( 36 ushort port, string prefix = null) { 37 HTTPServerSettings settings = new HTTPServerSettings; 38 settings.port = port; 39 40 return new VibrantRouter!GenerateAll(settings, prefix); 41 } 42 43 /++ 44 + Starts a vibrant server with http settings. 45 + 46 + Params: 47 + settings = The HTTP server settings object. 48 + prefix = The route prefix for all routes. 49 + 50 + Returns: 51 + An instance of the vibrant router. 52 ++/ 53 VibrantRouter!GenerateAll Vibrant(bool GenerateAll = false)( 54 HTTPServerSettings settings, string prefix = null) { 55 return new VibrantRouter!GenerateAll(settings, prefix); 56 }