This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello world! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# {key} to value before use | |
electron-packager {./path/to} {app_name} --app-version={0.3.0} --platform={all} --arch={x64} --asar={true} --icon={./path/to} --version-string.ProductName={app_name} --version-string.FileDescription={app_name} --version={1.2.3(electron version)} --overwrite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [$# -lt 1 ]; then | |
echo "$0 <server_name> 형식으로 작성해주세요 (master, stage, develop)" | |
exit 0 | |
fi | |
if [ $1 = "master" ]; then | |
echo "connect to master" | |
ssh -i master.pem ubuntu@url.to | |
elif [ $1 = "stage" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require('gulp'); | |
const concat = require('gulp-concat'); | |
const uglify = require('gulp-uglify'); | |
const removeLogs = require('gulp-removelogs'); | |
const debug = require('gulp-debug'); | |
var files = [ | |
'path/to/file.js' | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Realm = require('realm') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let UserSchema = { | |
name : 'User', | |
properties : { | |
name : 'string', | |
email : 'string', | |
tel : 'string', | |
date : 'date' | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// lib/realm.js | |
var Realm = require('realm'); | |
let UserSchema = { | |
... | |
}); | |
var UserRealm = new Realm({ | |
... | |
}); | |
module.exports = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Realm = require('../lib/realm.js'); | |
router.post('/', (req, res) => { | |
var name = req.body.name; | |
var email = req.body.email; | |
var tel = req.body.tel; | |
Realm.UserRealm.write( () => { | |
Realm.UserRealm.create('User', { | |
name : name, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Realm = require('../lib/realm.js'); | |
router.get('/', (req, res, next) => { | |
var users = Realm.UserRealm | |
.objects('User') | |
.sorted('date', true); | |
res.send({ | |
success : true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Realm = require('../lib/realm.js'); | |
router.get('/:name', (req, res) => { | |
var name = req.params.name; | |
var user = Realm.UserRealm | |
.objects('User') | |
.filtered(`name = "${name}"`) | |
.sorted('date', true); |
OlderNewer