node-roa-time
This module provides simple ways of getting Spain's official time from ROA ( Real Instituto y Observatorio de la Armada).
Installation
As usual, install via npm
npm install node-roa-time -g
CLI
If you install node-roa-time
globally, you can get ROA time in your command line.
$> roa
// output:
// ROA time is: domingo, 21 de septiembre de 2014 13:06
Async function
roa.get(options, callback)
Using get()
async function to obtain a date object wrapped with Moment.js utility.
Example:
var roa = ; roa;
Express/Connect middleware
app.use(roa.middleware(options))
You can use this module as an Express middleware to set roa time in every request.
Example:
var express = ;var roa = ; var app = ; app; app; app;