Skip to content

Commit 7328144

Browse files
committed
Add readme, cleanup
1 parent c0ecd44 commit 7328144

File tree

2 files changed

+48
-4
lines changed

2 files changed

+48
-4
lines changed

NodeRestAPI/readme.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Node.js Introduction
2+
3+
## Introduction
4+
5+
I use this sample in Node.js workshops to showcase fundamentals of Node.js development using TypeScript.
6+
7+
You can find more material inclusive additional samples and exercises at [https://rstropek.github.io/htl-mobile-computing/](https://rstropek.github.io/htl-mobile-computing/). This is the material I use when teaching mobile development at the HTL Perg. All the material is open source. Feel free to use and share it as you like.
8+
9+
## Content
10+
11+
### Setting up a Project
12+
13+
* Installing Node.js and NPM
14+
* Installing and working with packages ([*package.json*](package.json))
15+
* Working with TypeScript
16+
* Installing TypeScript
17+
* Type definitions
18+
* Build scripts in [*package.json*](package.json) including some useful tools like *concurrently*, *cpx*, etc.
19+
20+
### Node.js Fundamentals
21+
22+
* General principles
23+
* Modules
24+
* Built-in API
25+
26+
### TypeScript Fundamentals
27+
28+
* General principles
29+
* Language basics
30+
* Modules
31+
* Async programming basics
32+
33+
### koa
34+
35+
* Installation
36+
* Setting up router and pipeline
37+
* Configuring a view engine
38+
* Writing middlewares
39+
40+
### Testing
41+
42+
* Jasmine basics
43+
* Writing and working with unit tests

NodeRestAPI/src/people.spec.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
/**
2-
* @license
3-
* Copyright (c) Ammann Schweiz AG. All Rights Reserved.
4-
*/
51
import 'jasmine';
2+
63
import { getAllPeople } from './people';
74

5+
// Tip:
6+
// For testing web apis, consider using a testing framework
7+
// like supertest (https://github.com/visionmedia/supertest)
8+
89
describe('people middleware', () => {
910
it('returns some people', async (done: DoneFn) => {
1011
const contextMock: any = {};

0 commit comments

Comments
 (0)