Skip to content

Commit

Permalink
v0.2.3 - Release notes, readme, package, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
logeshpaul committed Apr 23, 2015
1 parent dff593a commit da902d5
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 11 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Perfectionist generator that scaffolds out different types of Frontend applicati
- **Simple Web App** — Sometimes you just need a gulp server(localhost), scss compiler & browser-sync(live reload). Well that's exactly what this app is for.
- **Full Pack Web App** - Thinking of creating a solid frontend base with proper structure, well optimization; choose this applicaton type which comes with power features.
- **Angular App** - Angular app with basic configurations and quick commands for creating controllers, directives, services and filters. More to come!
- **Restify App** - API developer? Want to create REST API services with mongodb, This app type got your back which scaffolds basic files like models, controller, routes, db & config.

# Getting Started

Expand Down Expand Up @@ -167,6 +168,24 @@ Your directory structure will look like this
└── .gitignore
````````

**Restify App**

````````
├── controllers
│ └── userController.js
├── models
│ └── userSchema.js
├── route.js
├── app.js
├── config.json
├── db.js
├── node_modules
├── package.json
├── gulpfile.js
├── .gitattributes
└── .gitignore
````````

# Quick commands

Terminal commands to speed up repetitive tasks you do in projects. Simple app idea is to maintain as minimal as possible; so quick commands won't work.
Expand Down Expand Up @@ -257,5 +276,5 @@ Contribution would be of great help to create a solid generator for frontend pro

**Active Contributers**

[![Logesh Paul](https://avatars3.githubusercontent.com/u/41541?v=3&s=72)](http:/www.github.com/logeshpaul) [![Gokulakrishnan](https://avatars0.githubusercontent.com/u/2944237?v=3&s=72)](https://github.com/gokulkrishh) [![Ritesh Babu](https://avatars3.githubusercontent.com/u/736660?v=3&s=72)](https://github.com/riteshbabu) [![Sugan Krishnan](https://avatars1.githubusercontent.com/u/680120?v=3&s=72)](https://github.com/rgksugan)
[![Logesh Paul](https://avatars3.githubusercontent.com/u/41541?v=3&s=72)](http:/www.github.com/logeshpaul) [![Gokulakrishnan](https://avatars0.githubusercontent.com/u/2944237?v=3&s=72)](https://github.com/gokulkrishh) [![Thiyagarajan](https://avatars2.githubusercontent.com/u/9147343?v=3&s=72)](https://github.com/ThiyagarajanJ) [![Ritesh Babu](https://avatars3.githubusercontent.com/u/736660?v=3&s=72)](https://github.com/riteshbabu) [![Sugan Krishnan](https://avatars1.githubusercontent.com/u/680120?v=3&s=72)](https://github.com/rgksugan)

1 change: 0 additions & 1 deletion app/templates/_typeRestifyApp/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ app.use(restify.queryParser());

app.listen(config.port, function() {
console.log('server listening on port number', config.port);

});
var routes = require('./routes')(app);
6 changes: 3 additions & 3 deletions app/templates/_typeRestifyApp/_routes.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = function(app) {
var user = require('./controllers/userController');
var user = require('./controllers/userController');

app.get('/', function(req, res, next) {
return res.send("WELCOME TO REST API");
});

app.post('/createUser', user.createUser);
app.post('/createUser', user.createUser);
};
6 changes: 3 additions & 3 deletions app/templates/_typeRestifyApp/_userController.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

function userController () {
var User = require('../models/userSchema');

// Creating New User
this.createUser = function (req, res, next) {
var name = req.params.name;
var email = req.params.email;
var age = req.params.age;
var city = req.params.city;

User.create({name:name,email:email,age:age,city:city}, function(err, result) {
if (err) {
console.log(err);
return res.send({'error':err});
return res.send({'error':err});
}
else {
return res.send({'result':result,'status':'successfully saved'});
Expand Down
4 changes: 2 additions & 2 deletions app/templates/_typeRestifyApp/_userSchema.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Model for the Student
// Model for the Student
module.exports = (function userSchema () {

var mongoose = require('../db').mongoose;
Expand All @@ -12,6 +12,6 @@ module.exports = (function userSchema () {
var collectionName = 'user';
var userSchema = mongoose.Schema(schema);
var User = mongoose.model(collectionName, userSchema);

return User;
})();
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-smacss",
"version": "0.2.2",
"version": "0.2.3",
"description": "Perfectionist Frontend Generator",
"author": {
"name": "Logesh Paul",
Expand Down
4 changes: 4 additions & 0 deletions release.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

**v0.2.3**
- New App Type - Restify! With generator-smacss you can create restify apps.
- Code cleanup and improvements.

**v0.2.2**

- Bower Components - Auto check dependencies and concat in right order
Expand Down

0 comments on commit da902d5

Please sign in to comment.