File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,6 +158,17 @@ const syntaxErrorTestMarker = ;
158158// integration test's InMemoryTransport) never binds a real port. Tests set
159159// NODE_ENV=test before importing server.js.
160160if ( process . env . NODE_ENV !== "test" && ! process . env . VERCEL ) {
161+ app . listen ( PORT , ( ) => {
162+ console . log ( `madmcp-server v2.1.0 listening on port ${ PORT } ` ) ;
163+ ...
164+ } ) ;
165+ }
166+
167+ // Default export so Vercel's Node runtime can invoke this as a serverless
168+ // function handler (Express apps are callable as (req, res) => {}). Named
169+ // exports are kept for tests/other tooling that import { app, mcpServer }.
170+ export default app ;
171+ export { app , mcpServer } ;
161172 app . listen ( PORT , ( ) => {
162173 console . log ( `madmcp-server v2.1.0 listening on port ${ PORT } ` ) ;
163174 if ( ! GITHUB_TOKEN ) console . warn ( "WARNING: GITHUB_TOKEN is not set." ) ;
@@ -172,8 +183,4 @@ if (process.env.NODE_ENV !== "test" && !process.env.VERCEL) {
172183 } ) ;
173184}
174185
175- // Default export so Vercel's Node runtime can invoke this as a serverless
176- // function handler (Express apps are callable as (req, res) => {}). Named
177- // exports are kept for tests/other tooling that import { app, mcpServer }.
178- export default app ;
179186export { app , mcpServer } ;
You can’t perform that action at this time.
0 commit comments