Skip to content
TypeScript Node/Express 👉TypeScript Serverless Angular
TypeScript HTML CSS JavaScript
Branch: master
Clone or download
Latest commit 9e19f8d Sep 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode peacock Sep 14, 2019
e2e init Sep 12, 2019
functions . Sep 13, 2019
server init Sep 12, 2019
src init Sep 12, 2019
.env.example init Sep 12, 2019
.eslintignore init Sep 12, 2019
.eslintrc init Sep 12, 2019
.gitignore init Sep 12, 2019
README.md 1. Sep 13, 2019
angular.json init Sep 12, 2019
browserslist init Sep 12, 2019
package-lock.json
package.json init Sep 12, 2019
proxy.conf.json init Sep 12, 2019
tsconfig.json init Sep 12, 2019
tslint.json init Sep 12, 2019

README.md

Heroes Angular Serverless

TypeScript Node/Express 👉TypeScript Serverless Angular

This project was created to help represent a fundamental app written with Node Express APIs and TypeScript that can be shifted to Serverless Functions with TypeScript.

The client app is Angular, however it could just as easily be Vue or React. The heroes and villains theme is used throughout the app.

by John Papa

Comparative client apps written with Vue and React can be found at at github.com/johnpapa/heroes-vue and github.com/johnpapa/heroes-react

Why

I love Node and Express for creating APIs! These require a server and paying for that server in the cloud. Shifting to serverless alleviates the cost, the server upkeep, helps scale up and down easily, and reduces the surface area of the middleware required for a robust Express app. Is it perfect? No, of course not! But this is a solid option if these factors affect you.

Prerequisites

Make a copy of the env.example file named .env, in the root of the project. It should contain the following code.

.env

NODE_ENV=development
PORT=7070
WWW=./

Getting Started

  1. Clone this repository

    git clone https://github.com/johnpapa/express-to-functions.git
    cd express-to-functions
  2. Install the npm packages

    npm install
  3. Build the Node Express and the Angular code

    npm run node-ng:build
  4. Run the app

    npm run node:start

Debug Node Express and Angular

  1. Open proxy.conf.json and change the port to 7070

  2. Open the VS Code Command Palette F1

  3. Type View: Show Debug and press ENTER

  4. Select Debug Express and Angular

  5. Press F5

  6. Open the browser to http://localhost:7070

You may now set break points in the Express and Angular code.

Debug Functions and Angular

  1. Open proxy.conf.json and change the port to 7071

  2. Open the VS Code Command Palette F1

  3. Type View: Show Debug and press ENTER

  4. Select Debug Functions and Angular

  5. Press F5

  6. Open the browser to http://localhost:7071

You may now set break points in the Functions and Angular code.

Problems or Suggestions

Open an issue here

Resources

Debugging Resources

You can’t perform that action at this time.