Skip to content

Commit

Permalink
feat(server,node): added port in app config
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinTh committed Aug 23, 2024
1 parent 3703080 commit 6f84b5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/app-server/src/index.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ app

serve({
fetch: app.fetch,
port: 8787,
port: config.server.port,
});
6 changes: 6 additions & 0 deletions packages/app-server/src/modules/app/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ export function getConfig({ env }: { env: any }) {
env: 'NODE_ENV',
},
server: {
port: {
doc: 'The port to listen on when using node server',
schema: z.coerce.number().min(1024).max(65535),
default: 8787,
env: 'PORT',
},
corsOrigin: {
doc: 'The CORS origin the server should allow',
schema: z.union([
Expand Down

0 comments on commit 6f84b5f

Please sign in to comment.