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',
|
'Cache-Control: public, max-age=604800, min-refresh=604800',
|
||||||
],
|
],
|
||||||
|
|
||||||
// Port
|
// Host and port for server
|
||||||
// To set custom options for listener, such as IP address, edit `src/http/index.ts`
|
host: '0.0.0.0',
|
||||||
port: 3000,
|
port: 3000,
|
||||||
|
|
||||||
// Log stuff
|
// Log stuff
|
||||||
|
|
|
||||||
|
|
@ -135,8 +135,9 @@ export async function startHTTPServer() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Start it
|
// Start it
|
||||||
console.log('Listening on port', appConfig.port);
|
console.log('Listening on', appConfig.host + ':' + appConfig.port);
|
||||||
server.listen({
|
server.listen({
|
||||||
|
host: appConfig.host,
|
||||||
port: appConfig.port,
|
port: appConfig.port,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,9 @@ export interface AppConfig {
|
||||||
// HTTP headers to send
|
// HTTP headers to send
|
||||||
headers: string[];
|
headers: string[];
|
||||||
|
|
||||||
|
// Host
|
||||||
|
host: string;
|
||||||
|
|
||||||
// Port
|
// Port
|
||||||
port: number;
|
port: number;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue