Skip to content

JordyBaylac/scaffold-node-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

what is this?

A minimalist example of a NodeJS tcp server. Using Typescript, Mocha for testing and N-API for native development.

Options available (see package.json)

  1. npm run build-cpp will build the native code and put it inside a folder named build/
  2. npm run build will run the typescript compiler and put the result in the folder dist/
  3. npm run start will run the node server generated in the above command
  4. npm run dev will run the typescript compiler and will run the *.ts files instead of *.js
  5. npm run prod will run steps 2 and 3
  6. npm run test run step 2 and call mocha to test every *.spec.js file
  7. npm run test-ts the same that above but testing over the *.ts files, not the generated *.js
  8. npm run debug run the debugger

installed packages

global packages

            npm install -g typescript  
            npm install -g ts-node
            npm install -g node-gyp
            npm install --global --production windows-build-tools //from admin shell

local packages (Development)

            npm install -D typescript
            npm install -D ts-node
            npm install -D mocha
            npm install --save  @types/node  
            npm install --save  @types/mocha            

important references

about typescript + node

about types for typescript

about testing

about n-api

before running npm install

  • Install the global packages presented in the installed packages section

About

An scaffold project using NodeJS + Typescript + N-API + Tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors