This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\phpsrc\php-sdk\phpdev\vc14\x64\php-7.0.4-src>nmake clean | |
Microsoft (R) Program Maintenance Utility Version 14.00.23506.0 | |
Copyright (C) Microsoft Corporation. All rights reserved. | |
Cleaning SAPI | |
Could Not Find C:\phpsrc\php-sdk\phpdev\vc14\x64\obj\Release_TS\php7ts.dll | |
Cleaning distribution build dirs | |
Could Not Find C:\phpsrc\php-sdk\phpdev\vc14\x64\obj\Release_TS\*.res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
let app = express(); | |
app.get('/', function(req, res) {res.status(200).send({status: "running", time: Date.now()})}); | |
/* POST */ | |
app.post('/', function(req, res) {res.status(200).send({status: "running", time: Date.now()})}); | |
/* PUT */ | |
app.put('/', function(req, res) {res.status(200).send({status: "running", time: Date.now()})}); | |
/* PATCH */ | |
app.patch('/', function(req, res) {res.status(200).send({status: "running", time: Date.now()})}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
let app = express(); | |
app.use(function(req, res, next) { | |
console.log('My logger', req.originalUrl); | |
next(); | |
}); | |
app.get('/', function(req, res) {res.status(200).send({status: "running", time: Date.now()})}); | |
/* POST */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
let app = express(); | |
const myFirstMiddleware = function(req, res, next) { | |
console.log('My logger'); | |
next(); | |
}; | |
app.use(myFirstMiddleware); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
let app = express(); | |
const myFirstMiddleware = function(req, res, next) { | |
console.log('My logger'); | |
next(); | |
}; | |
const myRouteMiddleware = function(req, res, next) { | |
console.log('My logger ', 'only for ', req.path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
let app = express(); | |
// parse application/x-www-form-urlencoded | |
app.use(bodyParser.urlencoded({ extended: false })); | |
// parse application/json | |
app.use(bodyParser.json()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
let app = express(); | |
// parse application/x-www-form-urlencoded | |
app.use(bodyParser.urlencoded({ extended: false })); | |
// parse application/json | |
app.use(bodyParser.json()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
let app = express(); | |
// parse application/x-www-form-urlencoded | |
app.use(bodyParser.urlencoded({ extended: false })); | |
// parse application/json | |
app.use(bodyParser.json()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
let app = express(); | |
// parse application/x-www-form-urlencoded | |
app.use(bodyParser.urlencoded({ extended: false })); | |
// parse application/json | |
app.use(bodyParser.json()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const helmet = require('helmet'); | |
let app = express(); | |
// Implementing basic security defaults using helmet | |
app.use(helmet()); | |
// parse application/x-www-form-urlencoded |
OlderNewer