You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.
Alexander Dadukin edited this page Jun 5, 2016
·
1 revision
A utility that allows you to create location-based applications for the web.
There is some advantages:
Easy to use
It supports two syntaxes
Constantly evolving
Simple example with fluent (try) syntax
'use strict';consthttp=require('http');constqueryString=require('query-string');constDefaultLocale=require('default-locale');constlocaleConfig=require('./config/custom')(__dirname);constRS='rs';// resource fieldconstLN='ln';// language fieldconstserver=http.createServer((req,res)=>{constquery=queryString.parse(req.url.substr(1));DefaultLocale.init(localeConfig);constresource=DefaultLocale.tryString(query[RS],query[LN]);if(!resource)returnres.end('There is no resource');res.end(resource);});server.listen(3000);