[vim, NERDTree] make show hidden file(like .gitignore) in NERDTree
hi vimmer,
what ever you're use shell type is not important,
it's working almost shell (like zsh)
just add code .vimrc in file
like this
let NERDTreeShowHidden=1
let NERDTreeShowHidden=1
$ npm install -g jasmine
$ npm install -save request
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
var User = require('mongoose').model('User');
exports.create = function(req, res, next) {
var user = new User(req.body);
console.log(req.body);
User.count({email: req.body.email},
function (err, count) {
if (!count) {
user.save(function(err) {
if (err) {
res.json(err);
} else {
res.json(user);
}
});
} else {
var errorMessage = 'User email is Already Exists';
console.log(errorMessage);
res.json(errorMessage);
}
});
};
exports.list = function(req, res, next) {
User.find({}, function(err, users) {
if (err) {
return next(err);
} else {
res.json(users);
}
});
};
exports.findUserByEmail = function(req, res, next) {
User.findOne({
email: req.params.email
}, function(err, user) {
if (err) {
console.log(err);
return next(err);
} else {
console.log(err);
res.json(user);
}
});
}
exports.remove = function(req, res, next) {
User.remove({
email: req.params.email
}, function(err, user) {
if (err) {
return next(err);
} else {
res.json(user);
}
});
}
| cs |
1
2
3
4
5
6
7
8
9
10
11
12
|
var users = require('../../app/controllers/users.server.controller.js');
module.exports = function(app) {
app.route('/users')
.post(users.create)
.get(users.list);
app.route('/users/:email')
.get(users.findUserByEmail)
.delete(users.remove);
}
| cs |
$ jasmine init
$ jasmine examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
var request = require('request');
// jasmine.getEnv().defaultTimeoutInterval = 500;
var r = request.defaults({'proxy':'http://localhost:4000/users'});
var requestDefault = 'http://localhost:4000';
describe('User Model Test', function() {
var email = 'test_' + Math.floor(Math.random()*10000) + '@gmail.com';
var form = {
email : email,
password : '12345678',
role : 'User'
}
var responseCallback = function(err, res, body, debug) {
if (debug) {
console.log(res);
}
expect(res.statusCode).toEqual(200);
if (res.statusCode !== 200){
console.log(res.statusCode);
console.log(body);
}
};
it('user list get', function(done) {
request.get(requestDefault + '/users', function(err, res, body) {
responseCallback(err, res, body);
done();
});
});
it('user create', function(done) {
request.post({
url : requestDefault + '/users',
form : form,
headers : {
'Content-Type' : 'application/json'
}
}, function(err, res, body) {
responseData = JSON.parse(body);
expect(responseData.email).toEqual(email);
responseCallback(err, res, body);
done();
});
});
it('user read', function(done) {
request.get(requestDefault + '/users/' + email, function(err, res, body) {
responseData = JSON.parse(body);
expect(responseData.email).toEqual(email);
responseCallback(err, res, body);
done();
});
});
it('user delete', function(done) {
request.del(requestDefault + '/users/' + email, function(err, res, body) {
responseData = JSON.parse(body);
// console.log(body);
expect(responseData.n).toEqual(1);
responseCallback(err, res, body);
done();
});
});
});
| cs |
Note Links : https://nodejs.org/api/process.html#process_process_env |
$ source .bash_profile $ echo $NODE_ENV
source "$HOME/.bash_profile"
$ source .bash_profile
phonegap : http://phonegap.com/ |
출처 :https://developer.salesforce.com/page/Native,_HTML5,_or_Hybrid:_Understanding_Your_Mobile_Application_Development_Options |
$ ionic run android
다시 실행!!!$ ionic build ios
$ ionic emulate ios