If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
//router basic | |
var http = require('http'); | |
var url = require('url'); | |
var routes = { | |
'GET':{ | |
'/': function(req, res){ | |
res.writeHead(2000, {'Content-type' : 'text/html'}); | |
res.end('<h1>Hola que tal</h1>'); | |
} |
//router basic | |
var http = require('http'); | |
var url = require('url'); | |
var qs = require('querystring'); | |
var routes = { | |
'GET':{ | |
'/': function (req, res){ | |
res.writeHead(200, {'Content-type': 'text/html'}); |
var http = require('http'); | |
var url = require('url'); | |
var port = 3000; | |
var fs = require('fs'); | |
var path = require('path'); | |
var mimes = { | |
'.html': 'text/html', | |
'.css': 'text/css', | |
'.js': 'text/javascript', | |
'.gif': 'image/gif', |
var http = require('http'); | |
var url = require('url'); | |
var port = 3000; | |
var fs = require('fs'); | |
var path = require('path'); | |
var mimes = { | |
'.html': 'text/html', | |
'.css': 'text/css', | |
'.js': 'text/javascript', | |
'.gif': 'image/gif', |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Ejercicios</title> | |
</head> | |
<body> | |
<dl id="abc"> | |
<dt>Nombres</dt> |
If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
function itemsDom(item, tag) { | |
var capture = document.getElementsByTagName(tag); | |
var item = capture.item(item); | |
if(item != 2) { | |
return item | |
} | |
else { | |
console.log(item); | |
} | |
} |
/* | |
A little node.js server for testing html5 ajax file uploads. | |
It serves up the current directory and receives uploads at /upload. | |
This is for use with xhr.send(file) where the entire request body is the file. | |
It just pauses one second between chunks so that client-side progress events | |
get a chance to fire. On my laptop it looks like the maximum chunk size is | |
around 40K, so you would still need images in the range of hundreds of kilobytes | |
to really be able to test it. |