Skip to content

Commit

Permalink
removed unuseful comment from server.js file
Browse files Browse the repository at this point in the history
  • Loading branch information
Aashutosh committed Oct 3, 2023
1 parent a301121 commit f4e2073
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 12 additions & 0 deletions logs/daily/application-2023-Oct-3rd.log
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,15 @@
{"level":"info","message":"\u001b[90mPOST /v1/code/create\u001b[39m \u001b[32m200\u001b[39m \u001b[90m51ms\u001b[39m","meta":{"req":{"body":{"content":"testing code with socket 2023-10-03","userId":"662086da-5533-4202-b26f-bc20ba4bdf24"},"headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br","authorization":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjJmNTQxNjgwLTM0N2UtNGRhOS1hZDNiLTYzOWU0NmQ3NmIyMiIsImlhdCI6MTY5NjMwNjAxMywiZXhwIjoxNjk2MzkyNDEzfQ.7ORryEP4KLU84XJuLpNXtPQU_QdiBm8o_C_3jk3RuM8","connection":"keep-alive","content-length":"111","content-type":"application/json","host":"localhost:9000","postman-token":"37a70cc9-a6e3-4de1-88bb-5afda1dd636f","user-agent":"PostmanRuntime/7.33.0"},"httpVersion":"1.1","method":"POST","originalUrl":"/v1/code/create","query":{},"url":"/v1/code/create"},"res":{"responseTime":51,"statusCode":200}}}
{"level":"info","message":"server is running on port: 9000"}
{"level":"info","message":"server is running on port: 9000"}
{"level":"info","message":"server is running on port: 9000"}
{"level":"info","message":"server is running on port: 9000"}
{"level":"info","message":"server is running on port: 9000"}
{"level":"info","message":"server is running on port: 9000"}
{"level":"info","message":"server is running on port: 9000"}
{"level":"info","message":"server is running on port: 9000"}
{"level":"info","message":"server is running on port: 9000"}
{"level":"info","message":"server is running on port: 9000"}
{"level":"info","message":"server is running on port: 9000"}
{"level":"info","message":"server is running on port: 9000"}
{"level":"info","message":"\u001b[90mPOST /v1/code/create\u001b[39m \u001b[32m200\u001b[39m \u001b[90m52ms\u001b[39m","meta":{"req":{"body":{"content":"testing code with socket 2023-10-03","userId":"662086da-5533-4202-b26f-bc20ba4bdf24"},"headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br","authorization":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjJmNTQxNjgwLTM0N2UtNGRhOS1hZDNiLTYzOWU0NmQ3NmIyMiIsImlhdCI6MTY5NjMwNjAxMywiZXhwIjoxNjk2MzkyNDEzfQ.7ORryEP4KLU84XJuLpNXtPQU_QdiBm8o_C_3jk3RuM8","connection":"keep-alive","content-length":"111","content-type":"application/json","host":"localhost:9000","postman-token":"f48f6cfb-bcb0-4cd0-8d73-3db04da5a66e","user-agent":"PostmanRuntime/7.33.0"},"httpVersion":"1.1","method":"POST","originalUrl":"/v1/code/create","query":{},"url":"/v1/code/create"},"res":{"responseTime":52,"statusCode":200}}}
{"level":"info","message":"\u001b[90mPOST /v1/user/login\u001b[39m \u001b[32m200\u001b[39m \u001b[90m11ms\u001b[39m","meta":{"req":{"body":{"email":"[email protected]","password":"testUser"},"headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br","connection":"keep-alive","content-length":"67","content-type":"application/json","host":"localhost:9000","postman-token":"bae084ad-7e1f-489c-af68-e9c294344e28","user-agent":"PostmanRuntime/7.33.0"},"httpVersion":"1.1","method":"POST","originalUrl":"/v1/user/login","query":{},"url":"/v1/user/login"},"res":{"responseTime":11,"statusCode":200}}}
8 changes: 0 additions & 8 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
const http = require('http');
// const socketIo = require('socket.io');
const app = require('./src/app');

require('dotenv').config();

// it .env.example by default
// path for .env file should be provide if it is in any folder
require('dotenv-safe').config({
allowEmptyValues: true,
path: './.config/.env',
Expand All @@ -15,19 +12,14 @@ const connnection = require('./config');

const logger = require('./src/utils/logger');

// const databaseConnection = require('./.config/dbConn');
const message = require('./src/constants/message');
// const socketConnection = require('./src/utils/socket');
const SocketClass = require('./src/utils/socket');

const server = http.createServer(app);

SocketClass.connectSocket(server);

// databaseConnection();
server.listen(connnection.port, () => {
logger.info(`${message.SERVER_START_MESSEGE} ${connnection.port}`);
console.info(`${message.SERVER_START_MESSEGE} ${connnection.port}`);
});

// module.exports = clientSocket;

0 comments on commit f4e2073

Please sign in to comment.