Merge pull request #9123 from streetwriters/fix/make-themes-host-configurable

Make themes server host configurable
This commit is contained in:
Abdullah Atta
2026-01-01 09:48:49 +05:00
committed by GitHub
3 changed files with 6 additions and 5 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@notesnook/themes-server",
"version": "1.0.0",
"version": "1.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@notesnook/themes-server",
"version": "1.0.0",
"version": "1.0.1",
"license": "ISC",
"dependencies": {
"@notesnook/theme": "file:../../packages/theme",

View File

@@ -1,6 +1,6 @@
{
"name": "@notesnook/themes-server",
"version": "1.0.0",
"version": "1.0.1",
"description": "A simple rest api for notesnook themes",
"private": "true",
"main": "src/index.ts",

View File

@@ -27,8 +27,9 @@ const server = createHTTPServer({
router: ThemesAPI
});
const PORT = parseInt(process.env.PORT || "9000");
server.listen(PORT);
console.log(`Server started successfully on: http://localhost:${PORT}/`);
const HOST = process.env.HOST || "localhost";
server.listen(PORT, HOST);
console.log(`Server started successfully on: http://${HOST}:${PORT}/`);
syncThemes();