yes, you can add authentication using middleware like this:
// server.jsconstjsonServer=require('json-server')constserver=jsonServer.create()constrouter=jsonServer.router('db.json')constmiddlewares=jsonServer.defaults()server.use(middlewares)server.use(router)server.listen(3000,()=>{console.log('JSON Server is running')})
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Is there a way to add auth to it?
yes, you can add authentication using middleware like this: