mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-20 04:05:06 -04:00
wip
This commit is contained in:
parent
0759981a55
commit
d848ad511e
24 changed files with 7195 additions and 251 deletions
|
@ -4,15 +4,14 @@ const fs = require('fs')
|
|||
const app = express()
|
||||
const port = 4400
|
||||
|
||||
const srcPath = 'src/levels.json'
|
||||
app.use(bodyParser.text({
|
||||
type: 'text/plain',
|
||||
limit:'1MB'
|
||||
}));
|
||||
|
||||
app.post('/', (req, res) => {
|
||||
app.post('/src/levels.json', (req, res) => {
|
||||
if(req.body?.trim()) {
|
||||
fs.writeFileSync(srcPath, req.body)
|
||||
fs.writeFileSync('src/levels.json', req.body)
|
||||
}
|
||||
res.end('OK')
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue