Skip to content

Instantly share code, notes, and snippets.

View dignifiedquire's full-sized avatar

Friedel Ziegelmayer dignifiedquire

View GitHub Profile

Beyond the MEAN stack

Presenter:

@othiym23

github.com/othiym23

MEAN

@jedi4ever
jedi4ever / nodejs-cluster-zero-downtime.md
Last active February 11, 2024 13:45
nodejs clustering, zero downtime deployment solutions

Clustering: The basics

The trick? pass the file descriptor from a parent process and have the server.listen reuse that descriptor. So multiprocess in their own memory space (but with ENV shared usually)

It does not balance, it leaves it to the kernel.

In the last nodejs > 0.8 there is a cluster module (functional although marked experimental)

@dominictarr
dominictarr / CYPHERLINK.md
Last active April 24, 2024 16:17
Cypherlinks
@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active April 11, 2024 04:45
A better markdown cheatsheet.
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@joelmoss
joelmoss / gist:5743190
Last active December 18, 2015 06:59
Codio JS Class proposal

Codio Javascript Class Proposal

While the Codio Client has a simple inheritance system in the form of the core/context plugin, it leaves a little to be desired and is lacking in a few areas that I feel would greatly improve the readability of our code base, as well as providing a little extra functionality.

Javascript has no such thing as Classes, but it has several different ways to fake them. We need a clean and concise way to define and use classes, with the ability for constructors, inheritance and access to overridden methods.

John Resig posted an article a long time ago with his solution for Classes in Javascript. It's simple, but powerful, and is extremely readable, so it will form the basis of this proposal.

The Base Class

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

Node.js Resources

What is node.js?

Node.js is just JavaScript running on the server side. That's it. That's all there is to it.

Express

  • Express Docs, if you want to get started and already know JavaScript this is the place to be
@domenic
domenic / interop.md
Last active July 7, 2022 19:47
`module.exports =` and ES6 Module Interop in Node.js

module.exports = and ES6 Module Interop in Node.js

The question: how can we use ES6 modules in Node.js, where modules-as-functions is very common? That is, given a future in which V8 supports ES6 modules:

  • How can authors of function-modules convert to ES6 export syntax, without breaking consumers that do require("function-module")()?
  • How can consumers of function-modules use ES6 import syntax, while not demanding that the module author rewrites his code to ES6 export?

@wycats showed me a solution. It involves hooking into the loader API to do some rewriting, and using a distinguished name for the single export.

This is me eating crow for lots of false statements I've made all over Twitter today. Here it goes.