4º. 1er cuatrimestre. Itinerario de Sistemas de la Información. Grado en Ingeniería Informática. ULL
DELETE
method is wired up to delete directories (using fs.rmdir
),
the file server currently does not provide any way to create a directory. Add
support for a method MKCOL
, which should create a directory by calling fs.mkdir
curl
para probar el comportamiento del servidor con los diferentes requests. Aquí tiene un ejemplo (incompleto) en gulp 3.9: var gulp = require("gulp");
var shell = require("gulp-shell");
gulp.task("pre-install", shell.task([
"npm i -g gulp static-server",
"npm install -g nodemon",
"npm install -g gulp-shell"
]));
gulp.task("serve", shell.task("nodemon server.js"));
gulp.task("lint", shell.task("jshint *.js **/*.js"));
gulp.task("get", shell.task("curl -v http://localhost:8000/file.txt"));
gulp.task("put", shell.task("curl -v -X PUT -d 'Bye world!' http://localhost:8000/file.txt"));
/Users/casiano/local/src/javascript/eloquent-javascript/chapter20-node-js/
(recurso para el profesor)