Add more user feedback (loading buttons, empty states)

This commit is contained in:
2024-09-24 16:36:30 +02:00
parent 03ff8b402f
commit 76c5e953a1
8 changed files with 171 additions and 20 deletions

View File

@@ -20,9 +20,12 @@ app.use(bodyParser.json())
// Create database and tables
startDatabase()
// Static files
const path = require('path')
app.use('/static', express.static(path.join(__dirname, 'images')))
// Add delay for more realistic response times
app.use((req, res, next) => {
console.log(123)
setTimeout(next, Math.floor((Math.random () * 4000) + 100))
})
@@ -33,9 +36,6 @@ app.use("/products", product)
app.use("/orders", order)
app.use("/accounts", account)
// Static files
const path = require('path')
app.use('/static', express.static(path.join(__dirname, 'images')))
// Start server
app.listen(port, () => {