BrainCrumbz / YANGTSE

Yet Another aNGular Two Starter, with Express.js this time

Home Page:http://www.braincrumbz.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YANGTSE

Yet Another aNGular Two Starter, with Express.js this time


A node.js based, client/server solution showing how to start up a project involving following technologies:

  • Express.js to serve web pages,
  • Angular 2 framework for client-side Single Page Application,
    • Ahead Of Time (AOT) compilation for a quicker application startup
  • TypeScript 2 as an alternative to JavaScript to write client code,
    • @types to include type definitions of external code
  • WebPack 2 module bundler to process and build client source files,
    • WebPack Hot Module Replacement to re-compile and reload web page when client source code changes,
    • Development, test and production builds
  • Karma test runner and Jasmine BDD testing library to unit test client source code.

Credits

This project draws from the experience and hints given by other, earlier Angular 2 starter projects. You might want to have a look at those, in case they might better suits your needs. Among the others, there are:

Prerequisites

Here are the tools that should be present in your development environment in order to work with this project:

node.js environment

Server side application relies on node.js to run. Client side application relies on JavaScript and TypeScript, but it needs node.js anyway to be built and processed.

  • nvm-windows 1.1.0, a node.js version management utility for Windows by Corey Butler
  • node.js 4.3.2
  • npm 3.8.0

Quick start

Clone or download this repository:

git clone --depth 1 https://github.com/BrainCrumbz/YANGTSE.git
cd YANGTSE

Install dependencies:

npm install

Serve application in development, with live reload and module replacement enabled:

npm start

Launch browser and go to http://localhost:3000/.

Available commands

This project has a number of npm-based commands in order to build and run both client and server source code.

Install

Install all dependencies:

npm install

Uninstall all dependencies:

npm uninstall

Build

Build for development:

npm run build  # or npm run build-dev

Build for production:

npm run build-prod

Clean build output:

npm run clean

Clean build output and all dependencies:

npm run clean-deep

Before building, output will be automatically cleaned. No need to manually clean.

Serve

Serve application in development, with live reload and module replacement enabled:

npm start  # or npm run serve, or npm run serve-dev

Serve application in production:

npm run serve-prod

Before serving, application will be automatically rebuilt. No need to manually build.

Test

Test:

npm test  # or npm run test

Test with debugging enabled (e.g. breakpoints in browser console):

npm run test-debug

Test in watch mode (keep running tests again when code changes):

npm run test-watch

License

MIT

About

Yet Another aNGular Two Starter, with Express.js this time

http://www.braincrumbz.com/

License:MIT License


Languages

Language:JavaScript 60.7%Language:TypeScript 29.2%Language:CSS 6.3%Language:HTML 3.8%