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 validFiscalCodeRegexp = /^([A-Za-z]{6}[\dlmnpqrstuvLMNPQRSTUV]{2}[abcdehlmprstABCDEHLMPRST]{1}[\dlmnpqrstuvLMNPQRSTUV]{2}[A-Za-z]{1}[\dlmnpqrstuvLMNPQRSTUV]{3}[A-Za-z]{1})$|(\d{11})$/; | |
const isValidFiscalCode = cf => validFiscalCodeRegexp.test(cf); |
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
var http = require('http'); | |
var url = require('url'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var port = process.argv[2] || 8080; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname; | |
var filename = path.join(process.cwd(), uri); |