Giter Site home page Giter Site logo

anvena / angular2-edge-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flauc/angular2-edge-app

0.0 2.0 0.0 333 KB

This application serves as an example for creating a basic Angular 2 application. The application was built as an example application for the Developing an Angular 2 Edge book.

JavaScript 4.11% TypeScript 56.77% HTML 13.16% CSS 25.96%

angular2-edge-app's Introduction

Developing an Angular 2 edge Application

This application serves as an example for creating a basic Angular 2 application. The application was built as an example application for the Developing an Angular 2 Edge book.

The repository also contains the server side code.

Features

  • Token based authentication
  • Authorization
  • Simple routing
  • Http and web socket communication
  • CRUD operations
  • "Real time" chat

Requirements

To start the application you need the following installed on your machine:

  • Node
  • MongoDB

You should also have the following npm libraries installed globally:

  • typescript
  • tslint
  • gulp

Set Up

To build the application run the following command in your console window when in the root of the project:

npm install

This installs all of the application dependencies from npm. Now we need to compile .ts and .styl files. To do this run the following command:

Now you can start the server and database with npm start or if you have a mongo server already running ( if you're running linux or a mac machine this might be the case ), first run npm run build and then npm run server.

You can also run npm run watch to start browser-sync for live reloading and the typescript compiler.

Server

The server for the Angular 2 Edge application is built in node.js and uses mongoDb. Server - Client communication is done primarily via web sockets but the server also provides a couple of HTTP Routes for demonstrational purposes.

HTTP API

The API primarily handles JSON data.

Base Url: localhost:5000

Route Method Request Description
/api/authorize POST {email: string, password: string} Returns the user along with the generated token
/api/sign-up POST {email: string, password: string, profileImage: number} Registers a new user
/api/users GET null Returns a list of all users in the database
/api/rooms GET null Returns a list of all rooms in the database

angular2-edge-app's People

Contributors

flauc avatar

Watchers

 avatar  avatar

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.