tomayac commited on
Commit
38fbf38
·
verified ·
1 Parent(s): b2ef3b1

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +6 -4
index.js CHANGED
@@ -3,14 +3,16 @@ import express from 'express';
3
  const app = express();
4
  const port = 7860;
5
 
6
- console.log(await import('express/package.json', {
7
  with: { type: 'json' }
8
- }))
9
 
10
- console.log(process.version)
 
 
11
 
12
  app.get('/', (req, res) => {
13
- res.send(`Running Node.js with Express.js`);
14
  });
15
 
16
  app.listen(port, () => {
 
3
  const app = express();
4
  const port = 7860;
5
 
6
+ const expressVersion = (await import('express/package.json', {
7
  with: { type: 'json' }
8
+ }).default.version;
9
 
10
+ const nodeVersion = process.version.split('.')[0];
11
+
12
+ console.log(`Running Node.js ${nodeVersion} with Express.js ${expressVersion}`);
13
 
14
  app.get('/', (req, res) => {
15
+ res.send(`Running Node.js ${nodeVersion} with Express.js ${expressVersion}`);
16
  });
17
 
18
  app.listen(port, () => {