merry-xmas
v1.0.6
Published
a html christmas card
Downloads
371
Readme
merry-xmas
this is a sweet little musical html christmas card
its easy to modify it
its mobile friendly
source is available
https://github.com/javascript-2020/javascript-2020.github.io/blob/main/merry-christmas.html
install
npm i merry-xmas
originally designed as an example for google cloud run
google cloud run : functions
//package.json
{
"dependencies": {
"merry-xmas": "^1.0.0"
}
}
//index.js
var html = require('merry-xmas');
exports.merryXmas=(req,res)=>{
res.writeHead(200,{'content-type':'text/html'});
res.end(html);
}//exports
gcloud functions deploy merryXmas --trigger-http --region=us-central1 --runtime=nodejs22 --allow-unauthenticated
although it can also be used with a server such as
//server.js
var html = require('merry-xmas');
require('http').createServer(request).listen(3000);
console.log('http://localhost:3000/');
function request(req,res){
res.writeHead(200,{'content-type':'text/html'});
res.end(html);
}//request
heres is a working example
https://javascript-2020.github.io/merry-christmas.html
im sure i'll keep updating it
have fun & merry christmas