mirror of https://github.com/iconify/api.git
feat: option to configure host for server
This commit is contained in:
parent
c577df4f98
commit
985db94876
|
|
@ -25,8 +25,8 @@ export const appConfig: AppConfig = {
|
|||
'Cache-Control: public, max-age=604800, min-refresh=604800',
|
||||
],
|
||||
|
||||
// Port
|
||||
// To set custom options for listener, such as IP address, edit `src/http/index.ts`
|
||||
// Host and port for server
|
||||
host: '0.0.0.0',
|
||||
port: 3000,
|
||||
|
||||
// Log stuff
|
||||
|
|
|
|||
|
|
@ -135,8 +135,9 @@ export async function startHTTPServer() {
|
|||
});
|
||||
|
||||
// Start it
|
||||
console.log('Listening on port', appConfig.port);
|
||||
console.log('Listening on', appConfig.host + ':' + appConfig.port);
|
||||
server.listen({
|
||||
host: appConfig.host,
|
||||
port: appConfig.port,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ export interface AppConfig {
|
|||
// HTTP headers to send
|
||||
headers: string[];
|
||||
|
||||
// Host
|
||||
host: string;
|
||||
|
||||
// Port
|
||||
port: number;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue