File tree Expand file tree Collapse file tree 4 files changed +3
-51
lines changed Expand file tree Collapse file tree 4 files changed +3
-51
lines changed Original file line number Diff line number Diff line change 88 "generate:version" : " node tools/scripts/generate-version.js" ,
99 "dev" : " nodemon src/server-start" ,
1010 "dev:prod" : " cross-env NODE_ENV=production nodemon src/server-start" ,
11- "start" : " node src/server" ,
11+ "start" : " node src/server-start " ,
1212 "start:prod" : " cross-env NODE_ENV=production node src/server-start" ,
1313 "lint" : " eslint ." ,
1414 "test" : " cross-env NODE_ENV=test jest" ,
Original file line number Diff line number Diff line change 11import request from 'supertest' ;
22import app from '../../app.js' ;
33
4- import { BACKEND_MOCK_SUFFIX } from '../../shared/constants/routes/backend-mock.constants.js' ;
4+ // import { BACKEND_MOCK_SUFFIX } from '../../shared/constants/routes/backend-mock.constants.js';
55
66// describe('API /persons', () => {
77// test('GET /persons should return status 200 and an array of 7 persons', async () => {
Original file line number Diff line number Diff line change @@ -17,18 +17,3 @@ describe('Server', () => {
1717 expect ( response . statusCode ) . toBe ( 200 ) ;
1818 } ) ;
1919} ) ;
20-
21-
22- // import request from 'supertest';
23- // import server from '../../server.js';
24-
25- // describe('Server', () => {
26- // afterAll(async () => {
27- // await server.close();
28- // });
29-
30- // it('should respond to GET / with 200', async () => {
31- // const response = await request(server).get('/');
32- // expect(response.statusCode).toBe(200);
33- // });
34- // });
Original file line number Diff line number Diff line change @@ -7,41 +7,8 @@ async function startServer() {
77 const server = app . listen ( appConfig . app . port , ( ) => {
88 console . log ( `✅ API listening on http://localhost:${ appConfig . app . port } ` ) ;
99 } ) ;
10+
1011 return server ;
1112}
1213
1314export default startServer ;
14-
15-
16-
17- // import app from './app.js';
18- // import appConfig from './config/app.config.js';
19- // import { connectRedis } from './core/cache/redis.client.js';
20-
21- // async function startServer() {
22- // try {
23- // await connectRedis();
24-
25- // const server = app.listen(appConfig.app.port, () => {
26- // console.log(`✅ API listening on http://localhost:${appConfig.app.port}`);
27- // });
28-
29- // server.on('error', (error) => {
30- // if (error.code === 'EADDRINUSE') {
31- // console.error(`❌ Port ${appConfig.app.port} is already in use.`);
32- // process.exit(1);
33- // } else {
34- // console.error('❌ Unexpected server error:', error);
35- // process.exit(1);
36- // }
37- // });
38-
39- // } catch (error) {
40- // console.error('❌ Failed to start server:', error);
41- // process.exit(1);
42- // }
43- // }
44-
45- // startServer();
46-
47-
You can’t perform that action at this time.
0 commit comments