Git Product home page Git Product logo

directory-ionic-nodejs's Introduction

Deploy

Employee Directory with Ionic and Node

Employee directory is a sample application that allows you to look up employees by name, view the details of an employee, call, text, or email an employee, and navigate up and down the org chart.

This version of Employee Directory is built with Ionic and Node.js.

alt tag

alt tag

alt tag

You can test the application in your browser:

  • Using the hosted version
  • By running the application's Node.js server locally
  • By deploying the application's Node.js server on Heroku

You can also run the application as a hybrid app in Cordova.

Hosted Version

Click here to run the hosted version in your browser.

Running the Node.js Server Locally

  1. Make sure you have an up-to-date version of Node.js installed on your system. If you don't have Node.js installed, you can install it from here.

  2. Clone this repository

  3. On the command line, navigate (cd) to the directory-ionic-nodejs folder

  4. Install the server dependencies

npm install
  1. Start the server
node server
  1. Open a browser and access: http://localhost:5000

Deploying the Node.js Server to Heroku

Click the "Deploy to Heroku" button at the top of this page to deploy the application to your own Heroku instance.

Running in Cordova

Step 1: Install Ionic

  1. Make sure you have an up-to-date version of Node.js installed on your system. If you don't have Node.js installed, you can install it from here.

  2. Open a terminal window (Mac) or a command window (Windows), and install Cordova and Ionic:

npm install -g cordova ionic

On a Mac, you may have to use sudo depending on your system configuration:

sudo npm install -g cordova ionic
  1. If you already have Cordova and Ionic installed on your computer, make sure you update to the latest version:
npm update -g cordova ionic

or

sudo npm update -g cordova ionic

Step 2: Create the application

  1. Using the Ionic CLI, create an application named employee-directory:
ionic start employee-directory
  1. Delete the default www folder in the employee-directory folder that was just created

  2. Copy the www folder from this repository to the Ionic project's employee-directory folder

  3. Modify www/js/services.js and specify the URL where your Node.js server is running. For example:

angular.module('directory.services', ['ngResource'])
    .factory('Employees', function ($resource) {
        return $resource('http://ionic-directory.herokuapp.com/employees/:employeeId/:data');
    });

Step 3: Building for iOS

You need the iOS SDK installed on your computer to build an iOS version of your application using the steps below.

  1. On the command line, make sure you are in the employee-directory folder

  2. Add support for the iOS platform:

    ionic platform add ios
    
  3. Build the project:

    ionic build ios
    
  4. Open employee-directory.xcodeproj in the employee-directory/platforms/ios folder

  5. In Xcode, run the application on a device connected to your computer or in the iOS emulator

Step 4: Building for Android

You need the Android SDK installed on your computer to build an Android version of your application using the steps below.

  1. Make sure the Android SDK and the ant build tool are available on your system. The Android SDK is available here. Both the android and ant tools must be available in your path. To test your configuration, you should be able to execute both android and ant from the command line.

  2. On the command line, make sure you are in the employee-directory folder

  3. Add support for the Android platform:

    ionic platform add android
    
  4. Build the project:

    ionic build android
    

    The project is built in the employee-directory/platforms/android folder

  5. To build and run the application on an Android device connected to your computer using a USB cable:

    ionic run android
    
  6. To build and run the application in the Android emulator:

    ionic emulate android
    

directory-ionic-nodejs's People

Contributors

ccoenraets avatar

Watchers

James Cloos avatar Apurva 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.