Coder Social home page Coder Social logo

barbagrigia / angular2-flask Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ansrivas/angular2-flask

0.0 2.0 0.0 1.55 MB

Simple angular2 app with python-flask backend ( Learning Angular2 )

Python 10.28% CSS 17.35% JavaScript 35.40% TypeScript 21.77% HTML 15.20%

angular2-flask's Introduction

angular2-flask

Simple angular2 app with python-flask backend (for learning angular2)

Usage

  1. backend directory contains the flask backend with simple authentication methods

  2. frontend directory contains the angular2 frontend as explained in angular-webpack-starter

Installation instructions

  1. Clone the repo

    git clone --depth 1 https://github.com/ansrivas/angular2-flask.git
    cd angular2-flask
  2. Install and run backend in a terminal

    • Server logs are stored in a directory named log_output
    cd backend
    sudo pip install -r requirements.txt
    python run.py
  3. Install frontend related dependencies

    • Easiest way to handle node related dependencies is to install nvm
    • Once you have node installed, install the project's dependencies
    cd front
    
    # install global dependencies
    npm install webpack-dev-server rimraf webpack typescript -g
    
    # install project related dependencies
    npm install
    
    # run server
    npm run server:dev:hmr
  4. Navigate to http://localhost:3000

  5. Default credential : admin:admin

Docker support:

  1. Build the docker backend
cd backend
docker build --no-cache  -t backend/python:latest .
docker run -it -p 8081:8081 --name server backend/python

To connect to the running container:

docker exec -it server /bin/sh
  1. Build the frontend
cd front
docker build --no-cache  -t frontend/angular2:latest .
docker run -it -p 3000:8080 --name angular2-app frontend/angular2
  1. Navigate to http://localhost:3000

  2. Easiest way to run this application to run docker-compose up in the project root directory.

angular2-flask's People

Contributors

ansrivas avatar davideast avatar lukefarran avatar rkirov avatar wardbell 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.