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 8
8
"generate:version" : " node tools/scripts/generate-version.js" ,
9
9
"dev" : " nodemon src/server-start" ,
10
10
"dev:prod" : " cross-env NODE_ENV=production nodemon src/server-start" ,
11
- "start" : " node src/server" ,
11
+ "start" : " node src/server-start " ,
12
12
"start:prod" : " cross-env NODE_ENV=production node src/server-start" ,
13
13
"lint" : " eslint ." ,
14
14
"test" : " cross-env NODE_ENV=test jest" ,
Original file line number Diff line number Diff line change 1
1
import request from 'supertest' ;
2
2
import app from '../../app.js' ;
3
3
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';
5
5
6
6
// describe('API /persons', () => {
7
7
// 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', () => {
17
17
expect ( response . statusCode ) . toBe ( 200 ) ;
18
18
} ) ;
19
19
} ) ;
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() {
7
7
const server = app . listen ( appConfig . app . port , ( ) => {
8
8
console . log ( `✅ API listening on http://localhost:${ appConfig . app . port } ` ) ;
9
9
} ) ;
10
+
10
11
return server ;
11
12
}
12
13
13
14
export 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