Node.js background only provides restfulAPI, what kind of design is it?

  node.js, question

This is a request test initiated by my front desk.

this.$http
 .get('http://localhost:3000/api/testGet', {
 params: {
 name: 'get'
 bracket
 })
 .then(function (data) {
 this.Get = data.body.msg
 })
 
 this.$http
 .delete('http://localhost:3000/api/testDelete', {
 params: {
 name: 'delete'
 bracket
 })
 .then(function (data) {
 this.Delete = data.body.msg
 })
 
 this.$http
 .post('http://localhost:3000/api/testPost', {
 name: 'post'
 })
 .then(function (data) {
 this.Post = data.body.msg
 })
 
 this.$http
 .put('http://localhost:3000/api/testPut', {
 name: 'put'
 })
 .then(function (data) {
 this.Put = data.body.msg
 })

This is my backstage processing

router.get('/testGet', function (req, res, next) {
 res.send({msg: 'get '});
 })
 
 router.delete('/testDelete', function (req, res, next) {
 res.send({msg: 'delete '});
 })
 
 router.post('/testPost', function (req, res, next) {
 res.send({msg: 'post '});
 })
 
 router.put('/testPut', function(req, res, next) {
 res.send({msg: 'put '});
 })

I don’t quite understand, whether to decide which method belongs to get,delete,put,post according to the function’s function? At present, my background express only provides api, routing and page completion by the front desk.

Yes POST,DELETE,PUT,GET respectively correspond to additions, deletions and changes.