Giter Club home page Giter Club logo

actionhero-node-client's Introduction

Actionhero

The reusable, scalable, and quick node.js API server for stateless and stateful applications


Actionhero Logo


NPM Version Node Version NPM Dependency Status Test Chat

Who is the Actionhero?

Actionhero is a multi-transport API Server with integrated cluster capabilities and delayed tasks. The goal of actionhero is to create an easy-to-use toolkit for making reusable & scalable APIs for HTTP, WebSockets, and more. Clients connected to an actionhero server can consume the api, consume static content, and communicate with each other. Actionhero is cluster-ready, with built in support for background tasks, 0-downtime deploys, and more. Actionhero provides a simple Async/Await API for managing every type of connection and background task.

Currently actionhero supports the following out of the box...

... and you can also make your own servers and transports.

Quick Start

# Generate a new Project
npx actionhero generate
npm install
npm run build
npm run dev # <-- I automatically notice changes and restart, as well as compiling .ts files

# Use the actionhero CLI
(npx) actionhero generate action --name my_action
(npx) actionhero generate task --name my_task --queue default --frequency 0

# Test
npm test

# To deploy your app
npm run build
npm run start

Your new project will come with example actions, tests, and more.

Or deploy a free API server now:

Deploy to Heroku

Learn More ๐Ÿ“š

In-depth Tutorials ๐ŸŽ“

Core Components

Server Types

Testing, Deployment, and Operations

Sample Projects

Who?

  • Many folks have helped to make Actionhero a reality.
  • If you want to contribute to actionhero, contribute to the conversation on github and join us on slack

Thank you to all of Actionhero's contributors!

image of contributors

Contributing

License

Apache 2.0

Dedication

Technology is a powerful force in our society. Data, software, and communication can be used for bad: to entrench unfair power structures, to undermine human rights, and to protect vested interests. But they can also be used for good: to make underrepresented peopleโ€™s voices heard, to create opportunities for everyone, and to avert disasters. This project is dedicated to everyone working toward the good.

Inspired by Martin Kleppmann

actionhero-node-client's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar dknell avatar evantahler avatar greenkeeper[bot] avatar greenkeeperio-bot avatar katopz avatar patrickjs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

actionhero-node-client's Issues

package.json correction

I am building a Meteor package for action hero_client and Npm.require() cannot resolve main from package.json.

In order to get the package to build, I changed:
"main": "actionHeroClient"
to:
"main": "actionhero_client.js"

connection object is wrong in actionhero client

var ActionheroClient = require("actionhero-client");
var client = new ActionheroClient();
client.connect({
host: "127.0.0.1", // first, I tried with just host
port: "8080", // and port
url: "http://localhost:8080"
},function(err, details) {
console.log("connect")
if(err != null){
console.log(err)
}else{
console.log("connected "+details.status);
client.roomAdd(channel);
client.on("say", function(msg){
console.log(msg);
});
}
});

An in-range update of actionhero is breaking the build ๐Ÿšจ

The devDependency actionhero was updated from 19.0.2 to 19.0.4.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

actionhero is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โœ… ci/circleci: build: Your tests passed on CircleCI! (Details).
  • โŒ ci/circleci: test: Your tests failed on CircleCI (Details).

Release Notes for v19.0.4: Chat and Redis fixes

And of course...

  • stabilize flaky socket server tests
  • updated all dependancies to latest stable version
  • various documentation updates
Commits

The new version differs by 86 commits.

  • cc41a64 Merge pull request #1263 from cecofreeman/patch-2
  • 26ea100 Merge branch 'master' into patch-2
  • 4fa86f1 Merge pull request #1264 from actionhero/socket-tests
  • d489108 orginize for faster computers too
  • e99000e orginize for faster computers too
  • da718ed wait sufficently long for other room ops to complete
  • 4066e24 no sleep in socket tests; all promises and callbacks
  • 52a7683 Merge branch 'master' of github.com:actionhero/actionhero
  • 9dacf3b update deps
  • aed0e96 newline socket test should make more sense
  • fcaad81 test: sleep before new delim
  • 6a768f9 test: sleep before new delim
  • 6f0dd49 v19.0.4
  • 530c823 Merge branch 'master' into patch-2
  • 95d1b37 try another approach for socket response parsing

There are 86 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

Connection lost problem

Hello!

We have discovered problem with actionhero-node-client version 7.0.1 and above. When two services running ActionHero are started and one of them connected to another via actionhero-node-client all works fine.

If we restart host service, the client is not try to reconnect and just log timeout errors to log. Sometimes it logs Not Connected error to log but we have not saw any reconnect attempts.

With version 7.0.0 all works great!

ActionHero 20.0.0
NodeJS 12.13.0
CentOS 7

An in-range update of standard is breaking the build ๐Ÿšจ


๐Ÿšจ Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! ๐Ÿ’œ ๐Ÿšš๐Ÿ’จ ๐Ÿ’š

Find out how to migrate to Snyk at greenkeeper.io


The devDependency standard was updated from 14.3.3 to 14.3.4.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

standard is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โœ… ci/circleci: build: Your tests passed on CircleCI! (Details).
  • โŒ ci/circleci: test: Your tests failed on CircleCI (Details).

Release Notes for 14.3.4 - 2020-05-11
  • Relax no-return-await rule (#1442)
Commits

The new version differs by 12 commits.

  • bf35e5f 14.3.4
  • 5b2af9c Merge pull request #1515 from Vrq/master
  • bca7bd2 Add SwissDev JS Jobs to users
  • 5040cff Merge pull request #1512 from iaurg/patch-1
  • 64c0486 Adjusting some typo errors in PT-BR Readme
  • c713105 Merge pull request #1510 from HCLonely/master
  • fc0ab4f Fix link cannot be positioned correctly
  • c93f3f3 Fix link cannot be positioned correctly
  • 8445fee Merge pull request #1506 from joshuagoran/patch-1
  • 0243b25 clarify constructor-super rule example
  • a9dad9e Merge pull request #1502 from standard/greenkeeper/eslint-config-standard-14.1.1
  • 282702b fix(package): update eslint-config-standard to version 14.1.1

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! ๐ŸŽŠ

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Replaced the old Node.js version in your .nvmrc with the new one
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If youโ€™re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didnโ€™t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didnโ€™t touch job or matrix configurations because these tend to be quite specific and complex, and itโ€™s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what youโ€™re doing it may require additional work or may not be applicable at all. Weโ€™re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, Iโ€™m a humble robot and wonโ€™t feel rejected ๐Ÿค–


FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

Self signed certificates

Hi!
I want to use TLS connections between AH instances and I use actionhero-node-client for connection. But I want to use internal Self signed certificates.
In current time, I cant pass options, especially rejectUnauthorized: false in tls.connect that located in client.js.

Can you please provide such ability?
Thank you!

An in-range update of standard is breaking the build ๐Ÿšจ

Version 10.0.1 of standard just got published.

Branch Build failing ๐Ÿšจ
Dependency standard
Current Version 10.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As standard is โ€œonlyโ€ a devDependency of this project it might not break production or downstream projects, but โ€œonlyโ€ your build or test tools โ€“ preventing new deploys or publishes.

I recommend you give this issue a high priority. Iโ€™m sure you can resolve this ๐Ÿ’ช


Status Details
  • โŒ continuous-integration/travis-ci/push The Travis CI build failed Details
Commits

The new version differs by 12 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot ๐ŸŒด

connection options not correct in the docs

I'll be willing to do a PR to fix them or the code... I just don't know what needs to be fixed. so, here's the lowdown of what works:

client = new ActionheroClient({
  host: "127.0.0.1", // first, I tried with just host
  port: "8880",      // and port
  // later, I noticed after looking at the source, that url wasn't rebuilt, so I added the url 
  url: "http://localhost:8880" 
})
// connected OK
client.connect(function(err, details) {
  console.log("connect", arguments)
  if(err != null){
    console.log(err)
  }else{
    console.log("connected "+details.status)
  }
})

(now that I think about it, my evaluation may be slightly wrong... I've only tested with the actionheroClient.js generated in the latest version of AH) so..

  1. the docs say to pass only host and port to the connect function not the constructor. func only accepts a callback.
  2. if only host and port are passed to the constructor, it'll still fail to connect because the the url is what is passed to Primus' constructor
  3. url isn't mentioned anywhere. I assume it was supposed to be generated

P.S. I just want to say, ** super awesome library! ** seriously! absolutely has reduced my dev time a whole bunch and a great concept... in addition, I've found some other bugs and I'm tracking them down still... they are the following:

  1. infinite restarting loop in dev mode when the code gets updated rapidly
  2. initializers not calling start when above 400. (though, this may be my fault cause as I recall I may have a generator in there, but it's happening to me on the sequelize plugin right now. I changed the number in the code to continue working but I'll get to the bottom of it soon)
  3. in latest chromium the navbar on top of the docs doesn't show

cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.