I have devserver where I write front-end project.
It exists apart from the real server (omit reasons - to raise ony server-side code of the project on the LAN is not easy). To check the efficiency of interface I request express, but rather a static json jsondata folder.
GET requests work fine - I receive in response nugie data, but if I replace get to post and express returns 404, although the way ostaetsya the same. What is the reason?
Start it by task in gulp:
'use strict'; const http = require("http"); const express = require('express'); const reload = require('reload'); const path = require('path'); module.exports = function(gulp, plugins, args, config, taskTarget, server) { gulp.task('express', function() { let options = { dotfiles: 'ignore', etag: false extensions: ['htm', 'html'], index: false, maxAge: '1d', redirect: false, setHeaders: function (res, path, stat) { Res. set('x-timestamp', Date.now()) } } server.use(express.static("../web", options)); server.listen(3000) }); };