cls-hooked
ActionHero
cls-hooked | ActionHero | |
---|---|---|
1 | 6 | |
748 | 2,387 | |
- | 0.0% | |
0.0 | 9.1 | |
13 days ago | 6 days ago | |
JavaScript | TypeScript | |
BSD 2-clause "Simplified" License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cls-hooked
-
Deferring Side-Effects in Node.js until the End of a Transaction
The solution to our problem comes from a wonderful package called cls-hooked. Using the magic of AsyncHooks, this package can tell when certain code is within a callback chain or promise. In this way, you can say: "for all methods invoked within this async function, I want to keep this variable in scope". This is pretty wild! If you opt into using Sequelize with CLS-Hooked, every SQL statement will check to see if there is already a transaction in scope... You don't need to manually supply it as an argument!
ActionHero
-
10 Node.js Frameworks Every Developer Should Know
ActionHero.js is one of the most well-known API frameworks. It will help you quickly develop scalable and reusable Node.js API servers for your projects. ActionHero acts as a toolkit that will allow you to build such API servers that will initially work together with existing applications and platforms. With tens of thousands of users, you can always find the right answers and ideas to ensure a daily efficient workflow with ActionHero.
-
Using Typescript to create a Robust API between your frontend and backend
Two of the major components of the @grouparoo/core application are a Node.js API server and a React frontend. We use Actionhero as the API server, and Next.JS for our React site generator. As we develop the Grouparoo application, we are constantly adding new API endpoints and changing existing ones.
-
Deferring Side-Effects in Node.js until the End of a Transaction
At Grouparoo, we use Actionhero as our Node.js API server and Sequelize for our Object Relational Mapping (ORM) tool - making it easy to work with complex records from our database. Within our Actions and Tasks, we often want to treat the whole execution as a single database transaction - either all the modifications to the database will succeed or fail as a unit. This is really helpful when a single activity may create or modify many database rows.
-
Ask HN: How Long Is Your CI Process?
Hard to say without knowing /what/ you want to accomplish in your CI process, so maybe some open source examples will help:
* A "complex" library (node-resque). In CI (CircleCI) we install deps, compile Typescript to JS, test on 3 versions of node, and build docs. 4 min w/ some parallelization https://app.circleci.com/pipelines/github/actionhero/node-re...
* A web server framework (actionhero): In CI(Github Actions) we install deps, compile Typescript to JS, test on 3 versions of node, and build docs. 7 min w/ some parallelization https://github.com/actionhero/actionhero/actions/runs/801273...
* A Monorepo (Grouparoo): In CI (CircleCI) we install deps, compile Typescript to JS, run migrations, check licenses, test UIs, CLI tools, Plugins, and try out a few different databases. 5 minutes with rather extreme parallelization https://app.circleci.com/pipelines/github/grouparoo/grouparo...
-
How do multiplayer javascript games communicate with servers?
Websockets are the answer. Checkout https://www.actionherojs.com/ for a framework that works great as game server.
-
Handling and syncing types, docs and validation!
1: for example - https://demo.actionherojs.com/swagger.html 2: https://github.com/actionhero/actionhero/pull/1671
What are some alternatives?
Sequelize - Feature-rich ORM for modern Node.js and TypeScript, it supports PostgreSQL (with JSON and JSONB support), MySQL, MariaDB, SQLite, MS SQL Server, Snowflake, Oracle DB (v6), DB2 and DB2 for IBM i.
Express - Fast, unopinionated, minimalist web framework for node.