tomayac commited on
Commit
8e89de5
·
verified ·
1 Parent(s): 7440eb4

Update index.js

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