As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
import { v4 as uuid } from 'uuid'; | |
export function generateId() { | |
return uuid(); | |
} | |
const v4 = new RegExp(/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i); | |
console.log(generateId().match(v4)); | |
//console.log(generateId().length) |
/** | |
* @license | |
* lodash 3.5.0 (Custom Build) <https://lodash.com/> | |
* Build: `lodash modern -o ./lodash.js` | |
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | |
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE> | |
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | |
* Available under MIT license <https://lodash.com/license> | |
*/ | |
;(function() { |
The idea is to have nginx installed and node installed. I will extend this gist to include how to install those as well, but at the moment, the following assumes you have nginx 0.7.62 and node 0.2.3 installed on a Linux distro (I used Ubuntu).
In a nutshell,
So for example, www.foo.com request comes and your css, js, and images get served thru nginx while everything else (the request for say index.html or "/") gets served through node.