Skip to content
This repository has been archived by the owner on Jan 8, 2018. It is now read-only.

EvidentSolutions/example-blogular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blogular - AngularJS example application

Prerequisites

The project uses Gradle, Node.js, npm, Bower and gulp, but if you use the bundled Gradle wrapper, the only thing you need to have installed is Java 8.

If you wish to optimize your workflow a bit, you probably want to install the other tools as well.

Quick-start

To get started, start a standalone version of the project:

./gradlew runStandalone

When everything as been compiled and server has started, open your browser: http://localhost:8080/

Optimized workflow

Debugging in IDEA

The project includes project files for IntelliJ IDEA. There are some shared run configurations you probably want to use:

  • web-api - Starts the backend in a Tomcat running inside IDEA.
  • web-api lag - Same as web-api but adds a simulated lag of 1 second to every request.
  • JS Debug - Connects JavaScript debugger to running frontend-module.
  • gulp watch - Starts process for compiling client code.

LiveReload

The project is configured to use LiveReload to refresh changes automatically to browser without having to manually reload. Install extension for your browser.

gulp

You don't need to install Node.js or gulp manually to get the build working since Gradle can execute them with its own node-plugin. However, if running inside Gradle, you'll lose the colorization in console and gulp takes a little longer to start. So if you have a working Node.js environment, install gulp by saying:

npm install -g gulp

After this you can just execute gulp in the frontend directory to run the frontend server.

(If you haven't followed the steps of Quick-start above, you'll also need to run npm install manually in the frontend-directory before running gulp.)

Running JavaScript unit tests

Unit-tests are using Karma. Run them by executing the following command in frontend-directory:

gulp test:unit

Running end-to-end tests

End-to-end tests are implemented using Protractor. First we need install the driver for Chrome, by issuing the following in frontend-directory:

node_modules/.bin/webdriver-manager update

After this we can start Selenium server:

node_modules/.bin/webdriver-manager start

When the server is running, we should start our application (e.g. using the method described in Quick-start) and then we can execute the tests against our application:

gulp test:e2e

About

Example blogging app with AngularJS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •