Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Aug 4, 2023
1 parent f6fc688 commit c380e25
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
19 changes: 19 additions & 0 deletions fake-server.js
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}`)
})
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"scripts": {
"dev": "toolpad dev",
"build": "toolpad build",
"start": "NODE_OPTIONS='--max-old-space-size=396' toolpad start"
"start": "NODE_OPTIONS='--max-old-space-size=396' node fake-server.js"
},
"dependencies": {
"@mui/toolpad": "^0.1.17",
"express": "^4.18.2",
"libnpmorg": "^5.0.4"
}
}
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2267,7 +2267,7 @@ execa@^5.1.1:
signal-exit "^3.0.3"
strip-final-newline "^2.0.0"

express@4.18.2:
express@4.18.2, express@^4.18.2:
version "4.18.2"
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
Expand Down

0 comments on commit c380e25

Please sign in to comment.