GithubHelp home page GithubHelp logo

mjhea0 / typescript-node-api Goto Github PK

View Code? Open in Web Editor NEW
125.0 9.0 70.0 4.47 MB

Home Page: http://mherman.org/blog/2016/11/05/developing-a-restful-api-with-node-and-typescript

JavaScript 9.20% TypeScript 90.80%

typescript-node-api's Introduction

Developing a RESTful API With Node and TypeScript

Want to learn how to build this project?

Check out the blog post.

Want to use this project?

  1. Fork/Clone
  2. Install dependencies - npm install
  3. Compile - npm run build
  4. Compile assets - gulp assets
  5. Run the development server - npm start
  6. Test - npm test

Sample Projects

typescript-node-api's People

Contributors

alexuxui avatar jsamr avatar m0uneer avatar mjhea0 avatar oferze avatar vkhv avatar xample 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  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  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  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

typescript-node-api's Issues

Can't run npm start

I can't run npm start, because i get an error that data.json can't be found in compiled js file. I tried many patch, but none of them work.

Small typo in the getting started section

Thank you for your great Typescript example! I just found a small typo in the 'Want to use this project?' section of the README.md file:

Wrong: gulp script
Correct: gulp scriptS

A small but important typo ;)

Cannot find module '../data'

Cannot find module '../data' (const Heroes = require('../data');)

when using npm start i am getting this error plz help

Can't find test files on Windows

Individual tests run fine and pass, but npm test reports:
Warning: Could not find any test files matching pattern: 'test/**/*.test.ts' No test files found npm ERR! Test failed. See above for more details.

Seems to be a common issue with Typescript, mocha and windows. Haven't seen a good solution.

Cannot find modules and type definition files

$ npm test

> [email protected] test /Users/username/GitHub/typescript-node-api
> mocha --reporter spec --compilers ts:ts-node/register 'test/**/*.test.ts'


/Users/username/GitHub/typescript-node-api/node_modules/ts-node/src/index.ts:312
          throw new TSError(formatDiagnostics(diagnosticList, cwd, ts, lineOffset))
                ^
TSError: ? Unable to compile TypeScript
Cannot find type definition file for 'body-parser'. (2688)
Cannot find type definition file for 'chai'. (2688)
Cannot find type definition file for 'chai-http'. (2688)
Cannot find type definition file for 'debug'. (2688)
Cannot find type definition file for 'express'. (2688)
Cannot find type definition file for 'express-serve-static-core'. (2688)
Cannot find type definition file for 'mime'. (2688)
Cannot find type definition file for 'mocha'. (2688)
Cannot find type definition file for 'morgan'. (2688)
Cannot find type definition file for 'node'. (2688)
Cannot find type definition file for 'serve-static'. (2688)
test/helloWorld.test.ts (1,24): Cannot find module 'mocha'. (2307)
test/helloWorld.test.ts (2,23): Cannot find module 'chai'. (2307)
test/helloWorld.test.ts (3,27): Cannot find module 'chai-http'. (2307)
test/helloWorld.test.ts (5,17): Cannot find module '../src/App'. (2307)
test/helloWorld.test.ts (10,1): Cannot find name 'describe'. (2304)
test/helloWorld.test.ts (12,3): Cannot find name 'it'. (2304)
test/helloWorld.test.ts (19,3): Cannot find name 'it'. (2304)

Improvement - PR wanted

hey, I am trying to push (via PR) some improvements to the test cases? Would you be so kind to allow be branching and raising a PR? thx

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.