@4lch4/api-starter
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -10,3 +10,3 @@ import { IAppConfig } from './interfaces/index.js'; | ||
*/ | ||
export declare function getServerStarter(config: IAppConfig): Promise<Server>; | ||
export declare function getServerStarter(config: Partial<IAppConfig>): Promise<Server>; | ||
/** This object contains all interfaces exported by the package. */ | ||
@@ -13,0 +13,0 @@ export * as Interfaces from './interfaces/index.js'; |
@@ -15,7 +15,7 @@ import { DEFAULT_APP_CONFIG, Server } from './lib/index.js'; | ||
// are present. | ||
config = { ...DEFAULT_APP_CONFIG, ...config }; | ||
const fullConfig = { ...DEFAULT_APP_CONFIG, ...config }; | ||
// Create a new server instance. | ||
const server = new Server(config); | ||
const server = new Server(fullConfig); | ||
// Get the routes to add to the server. | ||
const routes = getRoutes(config); | ||
const routes = getRoutes(fullConfig); | ||
// Add the middleware, routes, and then return the built server. | ||
@@ -22,0 +22,0 @@ return server.addMiddleware().addRoutes(routes); |
{ | ||
"name": "@4lch4/api-starter", | ||
"displayName": "API Starter", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "An NPM package to use for starting a new API within my infrastructure.", | ||
@@ -6,0 +6,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
116968