Skip to content
Eric M. Dantas edited this page Feb 27, 2016 · 16 revisions

how do I run this?

After installing it, just run:


$ yo ng-fullstack

do I need anything?

In case you're using node: read this.

In case you're using Go: read that.

anything else?

Check node dependencies installations.

Check Go dependencies installations.

um.. anything else?

Nope. But it'd be good if you had accounts on both Travis CI and Coveralls.io - so the badges of build and coveralls show up in your README (don't forget to sync your github repo).

alright, what now?

Either start the server using node.

Or start it using Go.

subgenerators

app:


$ yo ng-fullstack

This will create the structure above.

client

component:


$ yo ng-fullstack:component user --feature person

This will create:

client/dev/person/components/user.ts
client/dev/person/components/user.html 
tests/client/person/components/user_test.ts 

controller:


$ yo ng-fullstack:controller doctor --feature medic

This will create:

client/dev/medic/controllers/doctor.js 
tests/client/medic/controllers/doctor_test.js 

directive


$ yo ng-fullstack:directive i-toggle-stuff --feature common

This will create:

client/dev/common/directives/i-toggle-stuff.js 
tests/client/common/directives/i-toggle-stuff_test.js 

service


$ yo ng-fullstack:service http-parser --feature lib

This will create:

client/dev/lib/services/http-parser.js 
tests/client/lib/services/http-parser_test.js 

filter


$ yo ng-fullstack:filter myFilter --feature common

This will create:

client/dev/common/filters/myFilter.js 
tests/client/common/filters/myFilter_test.js 

factory


$ yo ng-fullstack:factory student --feature school

This will create:

client/dev/school/factory/student.js 
tests/client/school/factory/student_test.js 

resource


$ yo ng-fullstack:resource clazz --feature clazz

This will create:

client/dev/clazz/resource/clazz.js 

decorator


$ yo ng-fullstack:decorator q-extender --feature next-q

This will create:

client/dev/next-q/decorator/q-extender.js 

server

endpoint:


$ yo ng-fullstack:endpoint skate --feature skateboard

This will create (node):

server/api/skateboard/controller/skate-controller.js 
server/api/skateboard/route/skate-route.js 
server/api/skateboard/dao/skate-dao.js 
server/api/skateboard/model/skate-model.js 
tests/server/skateboard/dao/skate-dao_test.js 

And for Go:

server/api/skateboard/controller/skatecontroller.go
server/api/skateboard/controller/skatecontroller_test.go 
server/api/skateboard/route/skateroute.go 
server/api/skateboard/route/skateroute_test.go
server/api/skateboard/dao/skatedao.go 
server/api/skateboard/dao/skatedao_test.go
server/api/skateboard/model/skatemodel.go
server/api/skateboard/model/skatemodel_test.go 

tests

Client:


$ gulp test-client

Server (node):


$ npm run test-server

Server (Go):


$ go test ./... -cover -bench .

e2e:


$ webdriver-manager start
$ protractor

init


$ gulp

dist build


$ gulp build

structure

After running yo ng-fullstack, you'll get:

├── client
│    └── dev
│        └── todo 
│            ├── components 
│            ├── services
│            ├── templates
│            └── styles
│
├── server
│    ├── api
│    │   ├── todo
│    │   │     ├── dao
│    │   │     ├── models
│    │   │     ├── controllers
│    │   │     └── routes
│    │   │
│    ├── auth     
│    │   ├── local
│    │   │
│    ├── commons  
│    │   └── static 
│    │    
│    │
│    ├── config   
│    ├── constants
│    └── routes
│    
└── tests
     ├── client    
     │   └── todo
     │        ├── services
     │        ├── models
     │        └── services
     │   
     ├── e2e
     │   └── _helpers
     │   
     └── server
         ├── _helpers
         └── todo
              ├── dao
              ├── models
              ├── controllers
              └── routes

Clone this wiki locally