Giter VIP home page Giter VIP logo

senecajs.org's Introduction

logo

senecajs.org

Build Status Gitter

This repo contains the documentation website for Seneca.js. These docs are available at senecajs.org or can be ran locally by cloning this repo and following the steps below.

Run Locally

After cloning, you will need to get dependencies via npm,

npm install

Next simply build and serve to port 4000,

npm run build
npm run docs

Contributing

Seneca is an open project and encourage participation. If you feel you can help in any way, be it with examples, extra testing, tutorials, or new features please be our guest.

Please make all content changes in the /src/pages folder. All changes are built just before we redeploy the site so you only need to include changes in your PR. Upon your PR being accepted your changes will be deployed.

License

Copyright (c) 2010 - 2017 Richard Rodger and other contributors. Licensed under MIT.

senecajs.org's People

Contributors

adrianrossouw avatar adrieankhisbe avatar ava7 avatar blainsmith avatar bobfuru avatar ckiss avatar code-jace avatar geek avatar glentiki avatar grenudi avatar kulakowka avatar lloydbenson avatar mcdonnelldean avatar mihaidma avatar mikeztaylor avatar mtybo avatar naomifeehan avatar nfantone avatar paulovieira avatar piccoloaiutante avatar pixelastic avatar pofallon avatar rionastokes avatar rjrodger avatar senk avatar thefoxis avatar timoweiss avatar tswaters avatar vtardia avatar zpbappi 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

Watchers

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

senecajs.org's Issues

Document native driver usage for store plugins

Store plugins usually provide a common interface to access the underlying module handling storage. We need a tutorial explaining how this works with a number of our popular stores. I suggest:

  • leveldb
  • mysql
  • mongo

Complete API Documentation

We are missing summaries for all methods in the API doc. We need to get this completed as soon as possible even just enough to round out what is there.

getting started part 2

The getting started guide is excellent, one of the best Image read.

It would-be really usefull to go the next step you hint at and outline how you might use Docker. Also an outline full microservices dev. and deploy workflows would be a great help.

Or maybe that is the subject for blogs or a book? :)

Investigate hosting on Surge

I'd love to get your opinion about hosting on surge.sh. It is a free hosting service and supports CNAME, essentially the exact same as GH-Pages. There are two key differences though.

1: Docs can be much cleaner, we can output to a /dest folder and then run npm run deploy to push them to surge. The overall experience of working with the repo would massively improve.

2: Like npm Surge has a whitelist of people who can publish, this can be different from code contributors for whatever reason. The extra layer of security is a nice bonus.

To enable surge is as simple as downloading the CLI and setting up an account through it, 20 sec turn around time. After that you can specify which email address can push to your site. Adding a command to the package.json is handy too.

 // change to senecajs.org when cnamed
"deploy": "surge --project ./dist/ --domain seneca-docs.surge.sh"

Also note that we can use Travis to auto push too, if that's your thing.

Specify the version for which written documentation?

It would be nice if for each example or documentation for API was indicated version of the library. The usual case where documentation was not updated with new versions of the library. Maybe you can specify which version of the library has been written documentation?

Error running "Live Logs in your Browser" sample.

The "Live Logs in Your Browser" sample here http://senecajs.org/tutorials/logging-with-seneca.html has a line like this
var server = http.createServer(seneca.service())
I'm getting this error when trying to run it.

var server = http.createServer(seneca.service())
                                      ^
TypeError: undefined is not a function
    at Object.<anonymous> (/root/seneca/test.js:8:39)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

same code working on MAC but not windows

Hi,
I'm running the following code in MAC - works OK.
When running it on windows 7 - the following error occurs..

function color() {
  this.add( 'color:red', function(args,done){
    done(null, {hex:'#FF0000'});
  })
}


var seneca = require('seneca')


seneca()
  .use(color)
  .listen({type:'tcp'})

seneca()
  .client({type:'tcp'})
  .act('color:red')

// node readme-color-tcp.js --seneca.log=plugin:transport,level:INFO --seneca.log=type:act,regex:color:red
  • same for http transport
  • firewall was disabled...

The Error:
2015-10-15T09:14:46.808Z s3fx6o3a4jgi/1444900486776/7384/- DEBUG act remote$ IN m9bqsfq0d1ms/mj7vu98io1jj
{color:red} ENTRY CLIENT - - -
2015-10-15T09:14:57.946Z s3fx6o3a4jgi/1444900486776/7384/- ERROR act remote$ OUT - 11135 {color:r
ed} ENTRY CLIENT - seneca: Action failed: [TIMEOUT]. act_execute {id:m9bqsfq0d1ms/mj7vu98io1jj,gate:false
,ungate:false,desc:,plugin:{name:remote$,tag:null},time:{start:14449004 Error: [TIMEOUT]
at null._onTimeout (C:\seneca\node_modules\seneca\node_modules\gate-executor\gate-executor.js:95:
21)
at Timer.listOnTimeout as ontimeout

Thanks,

Tutorial explaining Native Driver usage

In cases where a store plugin uses a native driver under the hood, Seneca provides the ability to access these drivers. We need a Tutorial explaining the most common stores and provide examples.

Bonus points if you update the README's with an example on a per store basis. Each repo already has a section awaiting this info.

Document Seneca query syntax

A tutorial documenting Seneca's query syntax is needed. See below for example:

  • .list$({f1:v1, f2:v2, ...}) implies pseudo-query f1==v1 AND f2==v2, ....
  • .list$({f1:v1,...}, {sort$:{field1:1}}) means sort by f1, ascending.
  • .list$({f1:v1,...}, {sort$:{field1:-1}}) means sort by f1, descending.
  • .list$({f1:v1,...}, {limit$:10}) means only return 10 results.
  • .list$({f1:v1,...}, {skip$:5}) means skip the first 5.
  • .list$({f1:v1,...}, {fields$:['fd1','f2']}) means only return the listed fields.

Create contributors page

We have a number of documentationcontributors now, they should be listed on a page and in the package.json

guide: how to build a store with seneca-store-test

Hi, as part of my work in rewriting seneca-store-test I'm going to put together a brief guide on how to build a store.

However, there are a couple of things that are a bit obscure to me, and would be helpful if someone can explain me so that I can add that to the guide.

The first thing I encountered is the ceremony needed to register a store, something like:

  var meta = seneca.store.init(seneca, opts, store);
  desc = meta.desc;
  seneca.add({ init: store.name, tag: meta.tag }, function (args, done) {
    setup(opts, done);
  });

This is common among many of the current stores, but I'm not sure why is seneca.store.init needed and what it actually does, what is the meta object returned, and what's the need for the "init command" registered into seneca.

I'm also wondering if we are open to change and simplify this part of the api.

cc @mcdonnelldean @geek @rjrodger

Trello Card

Add documentation on $default when no match for action pattern

Following the issue https://github.com/rjrodger/seneca/pull/188 ,

looks like the $default option when a seneca client use the act method but no action pattern match the request is not documented.

The behavior is that if $default is an object ( or an array when is merged, https://github.com/rjrodger/seneca/pull/188 ), and no worker match the pattern asked, then $default will be return, as if if was returned by a worker.

This can probably be solved in the same time as #11

Trello Card

Prioritarise Documentation Need

Many Documentation guide have to be written.

Might be a good idea to determine which one are the most urgent so that we focus our attention on tehm.
Idea would be to mark them with a dedicated label, after we identify them with a discussion.

(tags to distingate between: core, user(use seneca), contributor(extend seneca), guide, tutorial might also be usefull)

What do you think?
@geek @rjrodger

Broken links

I was going to create a pull request, but then I realized I had some trouble finding the corresponding files so I decided to open an issue instead/first.

So, apparently, the tutorial pages contain some links that lead to the old version of the website which now simply throw 404s (if that is even the page that is being used to generate the tutorials from). It is not so hard to find which links are troublesome since they are nicely left at the bottom of the .md pages, but the thing is that some of the lead to specific anchors. For instance, the first link at the bottom of how-to-write-a-plugin.md which looks like this http://senecajs.org/api.html#long-m-add. The anchor is absent and I couldn't actually find where the "api" pages is being generated from so I could create a new one.

P.S. There is also an extra closing square bracket at the end of the link called "Seneca Examples" in the tutorials index.

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.