Masthash

#nodejs

Mx. Aria Stewart
10 hours ago

Can an http.ClientRequest ever emit both "response" and "error"? (assuming nothing external is emitting events on it)

#nodejs

Astra Kernel :verified:
11 hours ago

🪲 VSCode hack shows how supply chain attacks can extend to other software development tools

👉 Extensions are developed in Node.js
👉 Malicious npm packages to extensions
👉 Infected extensions & Auto update

https://www.reversinglabs.com/blog/vs-code-ide-hack-how-supply-chain-attacks-can-proliferate-between-developer-ecosystems

#vscode #infosec #programming #nodejs #npm

François Zaninotto
13 hours ago

Deno gets package.json support: great for #NodeJS interoperability! #TS https://deno.com/blog/package-json-support

Jeremiah Lee
21 hours ago

Oh happy day, mama! #TailwindCSS finally supports ESM!

Friendly reminder that the current and all long term support versions (18.x, 16.x, 14.x) of #NodeJS support ESM. You should be removing CJS everywhere.

https://tailwindcss.com/blog/tailwindcss-v3-3#esm-and-typescript-support

Kevin Brill
2 days ago

Trying to squeeze my brain on AsyncLocalStorage in #nodejs for a mature and complication codebase.

Been wrestling for a while trying to determine why context keeps getting lost. But I have a feeling that it's probably due to the combination of promises and async/await that make up the call stack when making REST calls.

Webdev Weekly
2 days ago
Ruby Weekly
2 days ago

There is just one repo written in Ruby that allows access to a mysql database using http protocol. Since the repo is outdated, how do I go about building something similar in node.js?

https://github.com/adamcooke/mysql-http-api

Discussions: https://discu.eu/q/https://github.com/adamcooke/mysql-http-api

#javascript #nodejs #programming #ruby #webdev

David Anson
3 days ago

Updated: #markdownlint v0.28.0, #Markdown #linting library for #NodeJS

- Introduce `micromark` parser for better positional data (internal only)
- Use `micromark` in MD013/MD033/MD034/MD035/MD038/MD044/MD052/MD053
- Simplify file-based test cases
- Unify browser script for demo
- Update dependencies

https://github.com/DavidAnson/markdownlint

Webdev Weekly
3 days ago

Web Development recap for week 12/2023

https://discu.eu/weekly/webdev/2023/12/

#css #javascript #nodejs #programming #typescript #webassembly #webdev

Get RSS feeds and support this bot with the premium plan: https://discu.eu/premium

Adam Nelson
3 days ago

New Spartan Schema release (v1.1), with actual detailed error messages! You can now use `assertMatchesSchema` to throw an exception on a validation failure, and the exception will contain the full JSON and the exact locations and details of every schema error.

https://deno.land/x/spartanschema@v1.1.1

#JavaScript #Typescript #NodeJS #Deno #JSON

Verwechslungsgefährte
4 days ago

htmx gives PHP a meaning again.

#NodeJS #lamp #web #php #htmx https://htmx.org

spazzpp2
4 days ago

htmx gives PHP a meaning again.

#NodeJS #lamp #web #php #htmx https://htmx.org

James King
4 days ago

Time travel debugging! Click on the link under a console.log, and it rewinds time and throws down a breakpoint.

https://www.youtube.com/watch?v=VQEVZacjt40

#gamedev #typescript #webgl #nodejs #tabletop #screenshotsaturday

Molly Draven
5 days ago

👋

Hello, #TypeScript famity. Can you please point me to a good, working example of how to declare #NodeJS package subpath exports, and then import the same in the the package?

I believe the example I saw what so that the tests could import the API, but the API would not be able to import the tests in error.

I'm getting everyone's favorite "Cannot find module" error 🙏

kalvn
5 days ago

GitHub - drizzle-team/drizzle-orm: TypeScript ORM for SQL
https://github.com/drizzle-team/drizzle-orm

Un query builder pour Node.js. L'outil se définit comme un ORM mais de ce que j'ai pu lire, ça ressemble beaucoup plus à un query builder. Une alternative à Knex.js en somme.

#orm #sql #javascript #nodejs #libhttps://links.kalvn.net/shaare/6yQghA

Eph Baum
5 days ago

Anyone out there #hiring for mid-level #SoftwareEngineers with experience with #nodejs, #dotNET, and #PHP? I know someone that might be on the market that I would love to recommend 😃

Christian Grasser
5 days ago

I love #coding on #linux!
For example the installation of node.js with the nvm installer.
I need a special version of node.js and I type nvm install 14.8.0 in the terminal!
That's it.

On #windows I always needed to deinstall the current version. Download the older version from the web and install it via msi installer.

#nodejs #node #nvm #shell

Mathieu Poussin
6 days ago

Any recommendation for a managed service to host internal pypi/gem/nuget/rpm/npm packages ? :)
#devops #sre #python #ruby #linux #dotnet #nodejs

Ain Tohvri
6 days ago

Turns out #NodeJS infrastructure relies on #Cloudflare, from the incident report published yesterday. https://nodejs.org/en/blog/announcements/node-js-march-17-incident #SRE #EdgeComputing

I may or may not have used #ChatGPT to write #unittest with #javascript due to utter laziness, and it just wrote just like what I had in mind 😆

#nodejs

reverentgeek
1 week ago

I'm coding live today at 2:00 PM ET! Come hang out and learn with me as we build a trivia game in Node.js using Vue, Tailwind CSS, and socket.io! #AHOTLive #streaming #nodejs #websockets #javascript

All Hands On Tech Live developer stream Thursdays at 11:00 AM PT/2:00 PM ET with David Neal, Pluralsight Principal Developer Advocate
Alec Perkins
1 week ago

Oof why have one way to do modules when you can have two incongruent ways? Thankfully found some good examples for how to maximize compatibility, but this is still pretty obnoxious. #NodeJS

Blain Smith
1 week ago

I wrote some #nodejs with #expressjs for my DB class project tonight. I haven't used this tech in many many years. The async/await API makes things much much less terrible.

Dennis Faucher :donor: :mastodon:
1 week ago

#NodeJS may be harder to exit than vi :)

❯❯ node
Welcome to Node.js v19.7.0.
Type ".help" for more information.
> quit
Uncaught ReferenceError: quit is not defined
> exit
Uncaught ReferenceError: exit is not defined
> exit()
Uncaught ReferenceError: exit is not defined
> process.exit()

François Zaninotto
1 week ago

GraphJin: Create a #GraphQL API on top of an existing relational database. Leverages forign keys to allow embeds & aggregations inside queries. Server libraries available in #NodeJS and
https://graphjin.com/

Matt Roberts
1 week ago

I’m #hiring software engineers in Dublin. Join me at DocuSign to build Smarter, Easier, Trusted Agreements

#nodejs #typescript #docker #kubernetes #azure #devops #microservices #observability #opensource #jobs

Know anyone who might be interested?

Backend Engineer.
https://careers.docusign.com/jobs/21614?lang=en-us

Platform Engineer.
https://careers.docusign.com/jobs/21616?lang=en-us

me·ta·phil, der
1 week ago

Hmm, there's an #ICS Event #Import‍er tool for @mobilizon – but only in planning phase, yet.

https://framagit.org/framasoft/joinmobilizon/event-importer

anyone willing to contribute to a useful tool for #fedi? #DecentralizeAllTheThings #FediDev #NodeJS

Irish Abroad
1 week ago

💻 In the third in our series of programming tutorials based on appearance data for Republic of Ireland players, I explain how to show that
1️⃣ The team against Scotland in September 2022 was the youngest to start a competitive game since a qualifier against Cyprus in November 1980
2️⃣ Stephen Kenny has given 15 players their debuts - the same number as Brian Kerr
#COYBIG #nodejs #programming #statistics #footballstatistics #stats

https://youtu.be/vG1uiNsRMXE

Lobste.rs
1 week ago

Comparing Node.js web frameworks: Which is most secure? https://snyk.io/blog/comparing-node-js-web-frameworks/ #javascript #security #nodejs

Lobsters
1 week ago
Juan Luis
1 week ago

This week I'm learning JavaScript, Node.js, TypeScript... the hard way: https://github.com/orgs/executablebooks/discussions/981

#til #projects #noob #nodejs

tbeseda
1 week ago

If you usually build with #NodeJS, what compiled language are you enjoying (or looking to pick up)?

Other than Rust. I think it would dominate, I'm interested in the runner up.

Reply with other. Boost if you have Node.js reach.
ty 💞

Lenny Primak
1 week ago

Just realizing that #Java doesn't pollute your install with modules like #NodeJS does, nor does it pollute your install with "per-install" packages like #ruby or #Python
Does this mean that #Java is way ahead? I think so. Thoughts?

Brian LeRoux 💚
1 week ago

toying w the idea of doing a talk titled "Transpiling: It has Tradeoffs" for #nodejs but entirely unsure if this is a complete waste of time for an audience that will learn better eventually anyways

Mark Stosberg
1 week ago

I've had great a great experience doing #spatialAnalysis with #NodeJS thanks to the Turf.js library ( https://turfjs.org ).

My one pain point was crashes related to floating point handling when doing a `union()` of complex polygons. But those issues were solved after I found `polyclip-ts`: https://github.com/SBanksX/polyclip-ts

The other library I use is "overpass-frontend" to query OpenStreetMap: https://www.npmjs.com/package/overpass-frontend

#mapping #gis

Webdev Weekly
1 week ago

Web Development recap for week 11/2023

https://discu.eu/weekly/webdev/2023/11/

#css #javascript #nodejs #programming #typescript #webassembly #webdev

Get RSS feeds and support this bot with the premium plan: https://discu.eu/premium

thomas 🌸
1 week ago

Interesting to read Ryan's explanation for bringing package.json support to deno and the goals using a bare specifier for v2 with the deno: package specifier. Excited for the future of deno 🦕 https://deno.com/blog/package-json-support

#deno #nodejs #typescript #javascript

Engineering challenges I'm interested in
🌲 Scaling high traffic #WordPress ecommerce sites. I will solve immediate problems and develop a strategy to move some parts of the stack out of WordPress. #AWS #Docker #Laravel #nodejs etc.
🌲 Using large language models -- GPT, etc. -- to improve content creation, personalization and search.
🌲Integrating #activitypub into CMSes and social media management tools
#FediHire

#TIL that "npm ci" means "npm clean-install". I always thought it was an #npm command for #continuousIntegration #ciCd #node #nodejs #javaScript

NaNdy Stalick
1 week ago

Is there a performant #Linux way to rasterize an #SVG that doesn't involve just using a whole web browser? Even a #python lib would do, but I'd rather keep it #nodeJS

Asking for my #Eink #Epaper #raspberrypi #raspi project

Chris Manson
2 weeks ago

I release a new command line tool today 🎉 It is a super-simple way to compare two folders and can be super useful when testing a build system against a known good output

https://github.com/mainmatter/compare-fixture

#opensource #testing #javascript #nodejs

Astra Kernel :verified:
2 weeks ago

🦀 Is rust overkill for apps that could be done quickly by NodeJS and PHP?

"not because of speed,but because of reliability.When we wrote those services in Rust,we effectively wrote them once.Our team is now moving on to new work,while other teams are still fixing...

The question was asked here
https://www.reddit.com/r/rust/comments/11uwwhy/is_rust_overkill_for_most_backend_apps_that_could/jcqom6r

#rustlang #rust #programming #python #php #golang #nodejs

NoI want to share my experiences here because I recently finished a deployment of a few services, two of which were written in Rust. (We use Rocket/Diesel).

Compared to Python and Javascript (NodeJS), the Rust services are more performant, use less CPU, use less memory, and can handle far more requests per second. To give you a rough ballpark, our Python services average about 50 req/s, NodeJS around 100 req/s, and Rust hits about 690 req/s.

We can fit 4 Rust services on a k8 EKS node that would normally host a single Python service. While build times are longer during deploys, horizontal scaling is lightning fast. When the limits of the services are pushed, new nodes come online quickly enough to make it look like nothing is happening at all.
NoI want to share my experiences here because I recently finished a deployment of a few services, two of which were written in Rust. (We use Rocket/Diesel).

Compared to Python and Javascript (NodeJS), the Rust services are more performant, use less CPU, use less memory, and can handle far more requests per second. To give you a rough ballpark, our Python services average about 50 req/s, NodeJS around 100 req/s, and Rust hits about 690 req/s.

We can fit 4 Rust services on a k8 EKS node that would normally host a single Python service. While build times are longer during deploys, horizontal scaling is lightning fast. When the limits of the services are pushed, new nodes come online quickly enough to make it look like nothing is happening at all.
Jan :rust: :ferris:
2 weeks ago

msw - Seamless REST/GraphQL API mocking library for browser and Node.js.

https://github.com/mswjs/msw

This is not your typical API Mock library - msw actually mocks by intercepting requests _on the network level_. ✨

#NodeJS #Testing #JS #JavaScript #Mocking #Mock #TDD #DevTools #WebDev #Network

cmmdmx
2 weeks ago

Today, #nodejs package hell drove me crazy. #commonjs and #esm bundling with only #esbuild seems to be impossible today; at least I didn't manage to get a configuration that supports
- browser environment (when installled in an app, for example with #vitejs)
- node environment (for services in node docker containers)
- bin script support

Especiallly the generated CommonJS of esbuild seems to be strange and lead to a lot of incompatibilites.

Tane Piper
2 weeks ago

Wrote my own #ChatGPT API with #alpacaCPP 😂 https://github.com/antimatter15/alpaca.cpp

(Basically, it runs the chat executable as a spawned process, then that file is forked from another that has an expressjs server running - working with this stuff with events is a mess but it works per request at least)

#nodejs #ai #api

A locally running ChatGPT bot using Alpaca.cpp
Brian LeRoux 💚
2 weeks ago

took the new #nodejs test runner for a spin and like it a lot. one less dependency and no more debates about test runners works well for me.

will keep our existing stuff on node-tap, and tape for a long time to come still I'm sure but nice to see this for new things.

https://github.com/brianleroux/architect-example-node-test-runner/blob/main/test.mjs

🌈 Lascapi
2 weeks ago

I'm looking for a #database of #software, #framework, #library and #plugin version where I can found for example which version of #webpack I can use with #angular8 and with which version of #typescript and #nodejs. ( #realWorld example 😅 ).

A bit like https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3

Any idea?

#freeSoftware #openSource #data #web #question

reverentgeek
2 weeks ago

I'm streaming today at 2:00 PM ET! Come hang out and learn with me as we build a trivia game in Node.js using Vue, Tailwind CSS, and socket.io! #AHOTLive #streaming #nodejs #websockets #javascript https://www.linkedin.com/feed/update/urn:li:ugcPost:7042174914186940416

All Hands On Tech Live developer stream Thursdays at 11:00 AM PT/2:00 PM ET with David Neal, Pluralsight Principal Developer Advocate
JS Party 🪩
2 weeks ago

📯 Today on JS Party LIVE  📯

Erick Wendel joins @jerod & @kball to discuss BeJSConf and his work on recreating @nodejs from scratch! Join us! 💚

#javascript #nodejs #deno #bunjs #runtimes

https://jsparty.fm/268/live
https://jsparty.fm/268/time
https://jsparty.fm/community

Brian LeRoux 💚
2 weeks ago

just trying to find the #nodejs docs…which is down…which seeing this doesn't really surprise me. I know the content is in here somewhere…

Tane Piper
2 weeks ago

I asked #ChatGPT "Show an example of a package.json file for a library that exports a function and needs to be supported in both node and the browser through ESM and CJS imports"

Not sure how correct it is? Any ideas #nodeJS #webDev folks?

A potential package.json for a library that works both in node and the browser
Here's what each property does:

* “name’: the name of your library

* “version’: the version of your library

* “main’: the entry point for CommonJS (CJS) imports in Node.js

* “module’: the entry point for ECMAScript module (ESM) imports in Node.js and browser environments that support ESM

* “exports’: maps import specifiers to files in your package, allowing users to import your library using different syntaxes (e.g., “import foo from 'my-library'® or “const foo = require('my-library')")

* “browser: overrides the “main” and “module" fields for use in browser environments that do not support ESM (e.g., older versions of Internet Explorer). The “browser" field maps CJS and ESM entry points to a single browser-compatible file.

* “files : alist of files to include in your package when it is published to npm. In this example, we only include the “dist" directory, which contains the compiled code for our library.

* “scripts’: commands that can be run with “npm run <script-name>". In this example, we have two scripts: “build™ (which uses Rollup to compile our library) and “prepublishOnly” (which ensures that the “build" script is run before publishing the library).

* “devDependencies’: packages that are only required during development (e.g., Rollup plugins).

* “dependencies’: packages that are required to use your library.
The files used as entry points

I think I'm going to intentionally omit node-g*p support from #orogene. I'm not convinced it's that essential anymore and I feel really uncomfortable just lazily going with the flow here.

Is this a dealbreaker?

#nodejs #npm

Webdev Weekly
2 weeks ago
Phil Nash
2 weeks ago

Ok, so I had a go with the #ChatGPT API and it was quite fun! I ended up learning about the Readline module in #NodeJS too.

Here's how to build your own CLI chatbot with ChatGPT and JavaScript: https://philna.sh/blog/2023/03/13/create-a-cli-chatbot-with-chatgpt-api-and-node-js/