1398 links
  • linx
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
  • ► Play Videos
Links per page: 20 50 100
page 1 / 1
14 results tagged nodejs x
  • thumbnail
    Promise based HTTP client for the browser and node.js
    • Make XMLHttpRequests from the browser
    • Make http requests from node.js
    • Supports the Promise API
    • Intercept request and response
    • Transform request and response data
    • Cancel requests
    • Automatic transforms for JSON data
    • Client side support for protecting against XSRF
    February 20, 2019 at 5:24:23 PM UTC - permalink -
    QRCode
    - https://github.com/axios/axios
    api axios broser client http json nodejs request
  • thumbnail
    Using different versions of node via nvm for each app · Issue #1034 · Unitech/pm2 · GitHub

    It is now available with the latest PM2 version:

    { 
      apps : [{
        name : 'API',
        script : 'api.js',
        interpreter : 'node@6.9.1'
     }]
    }

    https://github.com/Unitech/pm2/blob/master/test/fixtures/nvm-node-version/ecosystem.json#L12

    April 20, 2018 at 8:25:59 AM UTC * - permalink -
    QRCode
    - https://github.com/Unitech/PM2/issues/1034
    env monitoring nodejs nvm pm2 version
  • thumbnail
    node.js - How to specify a port number for pm2 - Stack Overflow

    You can use environment variable.
    For example:

    1) NODE_PORT=3002 pm2 start -I 0 app.js

    2) Read value in app:

    console.log(process.env.NODE_PORT);

    Or, if you are build express app:

    1) PORT=3002 pm2 start -I 0 ./bin/www

    2) Express load PORT automatically at start application.

    March 26, 2018 at 12:30:34 PM UTC * - permalink -
    QRCode
    - https://stackoverflow.com/questions/31502351/how-to-specify-a-port-number-for-pm2#31503097
    daemon monitoring nodejs pm2 server services
  • thumbnail
    Mistakes You’re Probably Making With MongooseJS, And How To Fix Them | The Code Barbarian
    February 6, 2018 at 3:19:55 PM UTC - permalink -
    QRCode
    - https://thecodebarbarian.wordpress.com/2013/06/06/61/
    good-practices js-ecosystem mongodb mongoose nodejs testing
  • faker.js

    Generate massive amounts of fake data in the browser and node.js

    February 4, 2018 at 9:34:56 PM UTC - permalink -
    QRCode
    - https://marak.github.io/faker.js/
    data fake js-ecosystem mock module nodejs
  • Node Redis

    This is a complete and feature rich Redis client for node.js. It supports all Redis commands and focuses on high performance.

    Install with:

    npm install redis
    July 22, 2017 at 12:00:52 PM UTC * - permalink -
    QRCode
    - http://redis.js.org/
    cache data database nodejs redis
  • thumbnail
    How does one unit test routes with Express?

    As others have recommended in comments, it looks like the canonical way to test Express controllers is through supertest.

    An example test might look like this:

    describe('GET /users', function(){
      it('respond with json', function(done){
        request(app)
          .get('/users')
          .set('Accept', 'application/json')
          .expect(200)
          .end(function(err, res){
            if (err) return done(err);
            done()
          });
      })
    });

    Upside: you can test your entire stack in one go.

    Downside: it feels and acts a bit like integration testing.

    May 14, 2017 at 10:21:09 PM UTC - permalink -
    QRCode
    - http://stackoverflow.com/a/18320575/954777
    express nodejs routes test
  • Node Tap

    A Test-Anything-Protocol library for Node.js

    May 14, 2017 at 10:19:39 PM UTC - permalink -
    QRCode
    - http://www.node-tap.org/cli/
    nodejs tap test
  • Deploying your NodeJS app with an Apache Proxy

    One of the things that really got me on board with NodeJS was the idea that I didn’t need a host container for it. Building a web app just means including a library that listens for HTTP requests on a port and respond. No more Apache! One less thing to worry about that isn’t my app!

    And then it starts getting complicated.

    For a start, port 80 is a privileged port, so when you try to launch the app to test or develop on your own machine you need to do so with sudo. That’s a little annoying, but you could default to port 80 & allow an override. But now you are adding more code to workaround it.

    And what about SSL? If you are going to use SSL in production (and you should) then your code is going to have to know about that too and read the certs and set that up. And that’s even more annoying for development, anyone working on your code is going to have to create their own certs just to launch your app. Unless you code in more workarounds.

    So that’s a suddenly a lot of code you are maintaining which might create its own problems.

    The alternative … use a webserver as a proxy for your app in production. It doesn’t have to be Apache, you could use Nginx for example. I use Apache because I’m reasonably familiar with it.

    May 11, 2017 at 4:44:01 PM UTC - permalink -
    QRCode
    - http://shinysparkly.com/blog/2015/05/31/node-in-apache/
    apache express httpd https nodejs proxies tls vhosts
  • thumbnail
    json-validator-simple

    Most of the JS ecosystem JSON validators are too complicated. I like the simplicity and this one is perfect

    April 13, 2017 at 8:10:32 PM UTC - permalink -
    QRCode
    - https://www.npmjs.com/package/is-good-json
    json nodejs simple validator
  • thumbnail
    Boilrplate

    A curated directory of boilerplates to help you start your projects!

    April 13, 2017 at 8:28:18 AM UTC - permalink -
    QRCode
    - http://www.boilrplate.com/language/nodejs
    app boilerplate nodejs skeleton template
  • thumbnail
    node.js - Restart node upon changing a file - Stack Overflow

    A good option is Node-supervisor and Node.js Restart on File Change is good article on how to use it, typically:

     npm install supervisor -g

    and after migrating to the root of your application use the following

     supervisor app.js
    April 8, 2017 at 9:54:33 PM UTC - permalink -
    QRCode
    - https://stackoverflow.com/questions/11175676/restart-node-upon-changing-a-file
    automation autorestart dev nodejs server supervisor
  • Run node.js service with systemd » Axllent.org

    Node.js as a running service is becoming more and more popular these days. One of the issues many developers face is how to ensure their node.js service starts automatically, and more importantly how to keep it running should it crash. Previously one had to install modules such as forever, and then create some autostart script to start the daemon when the server booted.

    Most Linux systems have recently switched to using systemd, which makes this process a lot simpler and more efficient, and means that we do not need forever any more.

    April 1, 2017 at 10:10:05 PM UTC - permalink -
    QRCode
    - https://www.axllent.org/docs/view/nodejs-service-with-systemd/
    express nodejs process-manager sysadmin systemd
  • thumbnail
    Process managers for Express apps

    When you run Express apps for production, it is helpful to use a process manager to achieve the following tasks:

    • Restart the app automatically if it crashes.
    • Gain insights into runtime performance and resource consumption.
    • Modify settings dynamically to improve performance.
    • Control clustering.

    A process manager is somewhat like an application server: it’s a “container” for applications that facilitates deployment, provides high availability, and enables you to manage the application at runtime.

    The most popular process managers for Express and other Node.js applications are as follows:

    • StrongLoop Process Manager
    • PM2
    • Forever
    • SystemD

    Using any of these three tools can be very helpful, however StrongLoop Process Manager is the only tool that provides a comprehensive runtime and deployment solution that addresses the entire Node.js application life cycle, with tooling for every step before and after production, in a unified interface.

    Here’s a brief look at each of these tools. For a detailed comparison, see http://strong-pm.io/compare/.

    April 1, 2017 at 9:58:00 PM UTC - permalink -
    QRCode
    - https://expressjs.com/en/advanced/pm.html#systemd
    express nodejs process-manager sysadmin systemd
Links per page: 20 50 100
page 1 / 1
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation