@@ -4,17 +4,19 @@ import cors from 'cors';
44import helmet from 'helmet' ;
55import morgan from 'morgan' ;
66import { healthCheck } from './db.js' ;
7- import githubAuthRouter from './routes/auth.github.js' ;
8- import userRouter from './routes/usersRoutes.js' ;
97import mcpRoutes from './routes/mcp.js' ;
108import agentRoutes from './routes/agent.js' ;
11- import cookieParser from 'cookie-parser ' ;
9+ import githubAuthRouter from './routes/auth.github.js ' ;
1210import deploymentsRouter from './routes/deployments.js' ;
11+ import authRoutes from './routes/authRoutes.js' ;
12+ import userRouter from './routes/usersRoutes.js' ;
13+ import cookieParser from 'cookie-parser' ;
1314import authAws from './routes/auth.aws.js' ;
1415import authGoogle from './routes/auth.google.js' ;
1516import { z } from 'zod' ;
1617import { query } from './db.js' ;
17- import jenkinsRouter from "./routes/jenkins.js" ;
18+ import jenkinsRouter from './routes/jenkins.js' ;
19+ import pipelineCommitRouter from './routes/pipelineCommit.js' ;
1820// app.use(authRoutes);
1921
2022const app = express ( ) ;
@@ -137,21 +139,19 @@ app.get('/connections', async (_req, res) => {
137139// -- Agent entry point
138140app . use ( '/deployments' , deploymentsRouter ) ;
139141app . use ( '/agent' , agentRoutes ) ;
142+ app . use ( '/mcp/v1' , pipelineCommitRouter ) ;
140143app . use ( '/mcp/v1' , mcpRoutes ) ;
141144
142145// Mount GitHub OAuth routes at /auth/github
143146app . use ( '/auth/github' , githubAuthRouter ) ;
144-
145-
147+ app . use ( authRoutes ) ;
146148// Mount AWS SSO routes
147149app . use ( '/auth/aws' , authAws ) ;
148150
149151// Mount Google OAuth routes
150152app . use ( '/auth/google' , authGoogle ) ;
151153
152154app . use ( '/jenkins' , jenkinsRouter ) ;
153- // // Mount GitHub OAuth routes at /auth/github
154- // app.use('/auth/github', githubAuthRouter);
155155
156156// --- Global Error Handler ---
157157app . use ( ( err , req , res , next ) => {
@@ -163,7 +163,5 @@ app.use((err, req, res, next) => {
163163 } ) ;
164164} ) ;
165165
166-
167-
168166const port = process . env . PORT || 4000 ;
169167app . listen ( port , ( ) => console . log ( `API on http://localhost:${ port } ` ) ) ;
0 commit comments