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
'use strict' | |
const express = require('express') | |
const session = require('express-session') | |
const cookieParser = require('cookie-parser') | |
const bodyParser = require('body-parser') | |
const passport = require('passport') | |
const SamlStrategy = require('passport-saml').Strategy | |
const app = express() | |
passport.serializeUser(function (user, done) { |
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
- hosts: all | |
sudo: yes | |
tasks: | |
- name: setup nodejs8.x | |
shell: curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
args: | |
creates: /usr/bin/node | |
- name: installing latest version of node.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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
$ node-red-admin target <Node-REDのエディタ画面のURL 例:https://node-red-123.herokuapp.com/red> | |
$ node-red-admin login | |
Username: <Herokuにデプロイする時に設定したユーザ名> | |
Password: <Herokuにデプロイする時に設定したパスワード> | |
Logged in | |
$ node-red-admin install node-red-contrib-force | |
Module: node-red-contrib-force | |
Version: 0.0.6 | |
Nodes Types State |
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 http = require('http'); | |
var express = require("express"); | |
var settings = require("./settings"); // <- require | |
var RED = require("node-red"); | |
// Create an Express app | |
var app = express(); | |
// Add a simple route for static content served from 'public' | |
app.use("/",express.static("public")); |
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
<script type="text/javascript"> | |
RED.nodes.registerType('Nodeのタイプ', { | |
// Nodeの定義 | |
}); | |
</script> |
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
{ init: [Function], | |
start: [Function: start], | |
stop: [Function: stop], | |
nodes: | |
{ init: [Function: init], | |
load: [Function: load], | |
createNode: [Function: createNode], | |
getNode: [Function], | |
eachNode: [Function], | |
addFile: [Function: addFile], |
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
Welcome to Node-RED | |
=================== | |
3 Dec 01:54:33 - [info] Node-RED version: v0.12.1 | |
3 Dec 01:54:33 - [info] Node.js version: v0.12.7 | |
3 Dec 01:54:33 - [info] Loading palette nodes | |
3 Dec 01:54:34 - [info] Settings file : [これが設定ファイルの場所] | |
3 Dec 01:54:34 - [info] User directory : [これがユーザディレクトリ] | |
3 Dec 01:54:34 - [info] Flows file : [これがflow設定ファイルの場所] | |
3 Dec 01:54:34 - [info] Server now running at http://127.0.0.1:1880/ |
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 crypto = require("crypto"); | |
var url = "https://mb.api.cloud.nifty.com/2013-09-01/login" | |
+ "?userName=" + process.env.USER_NAME | |
+ "&password=" + process.env.USER_PASS; | |
var method = 'GET'; | |
var signature = ""; | |
var _applicationKey = process.env.NCMB_APP_KEY; | |
var _timestamp = new Date().toISOString(); |
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 appName, | |
Heroku = require('heroku-client'), | |
heroku = new Heroku({ token: process.env.HEROKU_API_TOKEN }); | |
heroku.apps().create().then(function (app) { | |
appName = app.name; | |
return heroku.apps(appName).addons().create({ | |
"plan": "mongolab" | |
}); | |
}).then(function (addon) { |
NewerOlder