-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6fc688
commit c380e25
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const express = require('express') | ||
const app = express() | ||
const port = 80 | ||
|
||
app.get('/', (req, res) => { | ||
const arr = [1, 2, 3, 4, 5, 6, 9, 7, 8, 9, 10]; | ||
arr.reverse(); | ||
const used = process.memoryUsage(); | ||
let log = ''; | ||
for (let key in used) { | ||
log += `${key} ${Math.round(used[key] / 1024 / 1024 * 100) / 100} MB\n`; | ||
} | ||
|
||
res.send(`Hello World! ${log}`) | ||
}) | ||
|
||
app.listen(port, () => { | ||
console.log(`Example app listening on port ${port}`) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters