Git Product home page Git Product logo

grunt-express-angular-example's Introduction

grunt-express-angular-example

Sample app that shows the usage of grunt-express v1.0.

Highlights

  • Based on @bford's generator-angular
  • Authentication implementation based on @davemo's end-to-end-with-angularjs
  • The sample implementation allows total separation of express server and angular app (e.g. the server piece could be refactored out to a different NPM module)

How to run it

git clone [email protected]:blai/grunt-express-angular-example.git
cd grunt-express-angular-example
npm install
bower install
grunt server

Issues

Unfortunately, with option serverreload set to true, grunt-express will start the server asynchronously in a child process from the watch task, which is run after the open. So if you see a 404 page in browser after doing grunt server, just wait to see the server started message show up in the terminal and refresh the browser to see the app.

grunt-express-angular-example's People

Contributors

blai avatar xcthulhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

grunt-express-angular-example's Issues

Browser doesn't reload page when files are edited and saved

Shouldn't the browser page reload when I edit and save any of the files in the app folder, as is the case when using connect::livereload? As far as I can tell, nothing happens. I have to manually reload the browser page to see the change. Is this as expected?

`grunt server:dist` Doesn't Stay Open With keepalive

When you execute grunt server:dist you can see that after the build occurs that the express:dist:keepalive task is run, but the server does not stay open and grunt exits .

Console Output:

Running "open:server" (open) task

Running "express:dist:keepalive" (express) task

Running "express-server:dist" (express-server) task
Web server started on port:9000, no hostname specified [pid: 45270]

Done, without errors.

compass error

I just cloned the project and followed your directions and I get the following error when I run "grunt server"

    error app/styles/main.scss (Line 247 of app/bower_components/bootstrap-sass/lib/_mixins.scss: Invalid CSS after "...-shadow($shadow": expected ")", was "...) {")

Cannot make it work

Hi,

I have the following setup:

express: {
dev: {
options: {
hostname: "localhost",
server: path.resolve(__dirname, 'app.js'),
// serverreload: true
}
}

Whenever I modify some files this is what I get:

Running "express-server:dev" (express-server) task
app.js
Port 3000 in use
Web server started on port:3001, hostname: localhost [pid: 18494]

And I don't see the changes that I'm making in the server side js files.

If I set serverreload: true, I get the following result but I still don't see the changes made in the server side js files:

Running "express-server:dev:/tmp/express116316-18541-1ac0ya5/dev.server" (express-server) task
app.js
Web server started on port:3000, hostname: localhost [pid: 18550]

What am I doing wrong ?

Thanks in advance.

Examples given dont run

Have these examples in the README.md actually been tested lately, they dont work in Node and Express with the latest versions?

`grunt test` fails

After starting this project, I ran

npm install
bower install
grunt test

Returns the following error:

Chrome 29.0 (Mac) Controller: MainCtrl should attach a list of awesomeThings to the scope FAILED
    Error: No module: ui.bootstrap
        at Error (<anonymous>)
        at /Users/mpwd/Development/mao/app/bower_components/angular-unstable/angular.js:1148:17
        at ensure (/Users/mpwd/Development/mao/app/bower_components/angular-unstable/angular.js:1089:38)
        at module (/Users/mpwd/Development/mao/app/bower_components/angular-unstable/angular.js:1146:14)
        at /Users/mpwd/Development/mao/app/bower_components/angular-unstable/angular.js:2837:24
        at Array.forEach (native)
        at forEach (/Users/mpwd/Development/mao/app/bower_components/angular-unstable/angular.js:148:11)
        at loadModules (/Users/mpwd/Development/mao/app/bower_components/angular-unstable/angular.js:2833:5)
        at /Users/mpwd/Development/mao/app/bower_components/angular-unstable/angular.js:2838:38
        at Array.forEach (native)
    TypeError: Cannot read property 'awesomeThings' of undefined
        at null.<anonymous> (/Users/mpwd/Development/mao/test/spec/controllers/main.js:20:17)
Chrome 29.0 (Mac): Executed 2 of 2 (2 FAILED) (0.162 secs / 0.039 secs)
Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.

Html 5 Mode

Turning on HTML 5 mode via $locationProvider.html5Mode(true); in the app.js causes Angular routes to be completely unavailable.

Is there a work around for this?

Express server blocking other watch tasks

I cloned this repo, and am running grunt with the configurations provided. Whenever I try to make a change to files that are meant to be watched (in this case, app/styles/main.scss) the files do not update properly. I think the server process is blocking the watch processes for some reason. When I run grunt watch the static files update as expected.

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.