• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

* Welcome Mario Casciaro & Luciano Mammino

 
author
Posts: 23909
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

This week, we're delighted to have Mario Casciaro & Luciano Mammino helping to answer questions about the new book Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques.


The promotion starts Tuesday, October 26th, 2021 and will end on Friday, October 29th, 2021

We'll be selecting four random posters in this forum to win a free copy of the book provided by the publisher, Packt Publishing.


Image from https://m.media-amazon.com

Please see the Book Promotion page to ensure your best chances at winning!

Posts in this welcome thread are not eligible for the drawing, and should be reserved for welcoming the author. Questions posted in this topic are subject to removal.
 
Marshal
Posts: 74341
334
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good to see you here I hope you have lots of awkward interesting questions. I probably shan't ask much because I have forgotten all the JS I ever knew.
 
Ranch Hand
Posts: 312
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the ranch
 
Greenhorn
Posts: 23
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello and welcome!
 
Author
Posts: 9
jQuery Python TypeScript
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone, i am honored to be here and to have Node.js design patterns featured in this thread. Happy to answer any of your questions related to the book.
 
Greenhorn
Posts: 6
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a pattern to create an NPM library using Node.js that can be imported with and used in vanilla JavaScript?
 
Luciano Mammino
Author
Posts: 9
jQuery Python TypeScript
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rebecca Peltz wrote:Is there a pattern to create an NPM library using Node.js that can be imported with and used in vanilla JavaScript?



Hello Rebecca,
I am not sure i would call it "a pattern" but in general, if you don't use functionality that is available only in the Node.js standard library, you can easily publish npm modules that work both on browsers and Node.js.

I have done something similar in the past, so if you need an example you can check out this one: https://github.com/lmammino/financial

I hope this answers your question.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic