Coder Social home page Coder Social logo

aritmeticaexpress's Introduction

aritmèticaExpress

Demonstration nodeJS JSON Application Server based on Express 3, enough to learn client JavaScript, JSON and some server programming.

Installing

Node.js (tested with 0.8.11), express and commander modules

$ npm install

Server Launch

$ node service

Port 80 is used by default. If you do not have the proper privileges, you can change port with -p / --port argument option.

$ node service --port 3000

By default cluster is disabled. To activate use -c / --cluster option. It enables as many processes as logical processors are available. To disable default cluster behaviour, you can use -t / --processes option passing the number of processes to fork.

$ node service --c -t 32

Testing

To test local processes you can uses Apache Benchmark:

$ ab -k -n 100000 -c 100 -p post.txt -T "application/json" -B 127.0.0.1 "http://127.0.0.1/mult"

To test it remotely:

$ ab -k -n 100000 -c 100 -p post.txt -T "application/json" "http://service-adress/mult"

Business code

Business code is located in service.js, inside api object. Arithmetic vector sample operations are provided and a load operation is included as well.

aritmeticaexpress's People

Contributors

jig avatar

Watchers

 avatar

Forkers

maldo

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.