GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TypeScriptSamples/node at master · coopercoder/TypeScriptSamples

Expand file tree

/

node

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

node

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
index.ts
index.ts
 
 
lorem.txt
lorem.txt
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
tslint.json
tslint.json
 
 

README.md

Outline

TypeScript Sample: Node.js

Overview

This sample implements a very basic node.js application using TypeScript.

Running

First of all, install all dependencies with:

npm install

Then, you can run each of the listed examples with the following command from the this project root folder:

ts-node ./examples/example-name.ts

To run the HTTPS server example, just:

ts-node ./examples/HttpServer.ts

This examples are running through ts-node, which is not recommended in production environments. You can also build those examples with:

npm run build

And then running the compiled JavaScript (JS) example file with:

node ./dist/example-name.js

Examples

  • TcpServer - a simple TCP server
  • HttpServer - a simple HTTPS server
  • API Client - client that sends a "ping"
  • API Server - server the receives that "ping" and responds with a "pong"
  • Word counter - shows how many of the desired words are presented in a file
  • Wikipedia Search - searches the Wikipedia website

note: due to HTTP/HTTPS distinct way of handle localhost requests, in the examples HTTP is used instead of HTTPS because is a more easy way to set it up.

Standards

A modified version of the Microsoft Linter Standards is used. Please be mindful that they are here to help you out improve you code.

Git Hooks

Due to Husky integration, before any push to this Github repository, TSLint will run and then point out all the fixes that needs to be done to follow the set of code standards; if nothing needs to be corrected, you then can push it :)

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.