Installing node Demo files

Installing node Demo files

rldean1rldean1 Posts: 141Questions: 66Answers: 1

Hey guys I'm still a noob with node, and I'm having issues testing out the demo files:

  1. I got the Demo DB setup in MSSQL successfully
  2. I downloaded & unzipped the Demo/Node files to a new folder: c:\NodeProject3
  3. Using a terminal, from c:\NodeProject3, I ran npm install, npm install express, and datatables.net-editor-server (not necessarily in that order)
  4. I configured the DB.js, trying both my own username/password, and also Windows Authentication with msnodesqlv8 (unable to confirm if either worked...)
  5. when I run npm start, I get the message indicated below

Any ideas on what I'm missing?

Error: listen EADDRINUSE 0.0.0.0:8081
    at Server.setupListenHandle [as _listen2] (net.js:1286:14)
    at listenInCluster (net.js:1334:12)
    at doListen (net.js:1460:7)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
    at startup (internal/bootstrap/node.js:285:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! datatables.net-editor-demo@1.9.2 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the datatables.net-editor-demo@1.9.2 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\<DON'T HACK ME>\AppData\Roaming\npm-cache\_logs\2020-01-10T16_49_28_933Z-debug.log

Answers

  • rldean1rldean1 Posts: 141Questions: 66Answers: 1

    OKAY ---- WAIT!!!!

    So that error means that there something else on my machine that's listening on 8081. I have changed the demo files to listen on a different port, and that seems to have made a difference.

    I'm now working on the credentials. I will post if I'm able to get my own personal creds to work, or if I can get Windows Authentication to work.

    (at the moment, with manually-specified creds, I'm getting ConnectionError: Login Failed for user ....).

    Will post response later.

  • rldean1rldean1 Posts: 141Questions: 66Answers: 1

    I can't get my creds to pass. I probably don't have the dbConfig setup correctly.

    Do I have to use KNEX to play with the Demo? For right now, I kinda want to use the msnodesqlv8 driver since it supports Windows Authentication.

    Is KNEX required to use Node with DataTables/Editor?

    I don't really need to build query strings in Node or JS. All our queries/logic are in Stored Procedures. I just need Node/Express for the Controllers & Routes, I guess.

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    So that error means that there something else on my machine that's listening on 8081. I have changed the demo files to listen on a different port, and that seems to have made a difference.

    Yup - spot on.

    Do I have to use KNEX to play with the Demo?

    If you want to use our NodeJS libraries for Editor - then yes. Knex is a hard dependency as the libraries build up the SQL queries for Editor using the Knex API.

    If you don't want to use our libraries though, then no, you can use whatever you want to interact with the database! The client / server data interchange format is documented here and I'm happy to answer any questions you might have about it.

    Regards,
    Allan

This discussion has been closed.