ctrl + a Goto BEGINNING of command line
ctrl + e Goto END of command line
ctrl + b move back one character
ctrl + f move forward one character
| // config/passport.js | |
| // load all the things we need | |
| var LocalStrategy = require('passport-local').Strategy; | |
| var mysql = require('mysql'); | |
| var connection = mysql.createConnection({ | |
| host : 'localhost', | |
| user : 'root', |
| 'use strict'; | |
| var mysqlBackup = require('./mysql-backup'); | |
| var schedule = require('node-schedule'); | |
| schedule.scheduleJob({ hour: 22, minute: 0 }, mysqlBackup); |
| 'use strict'; | |
| // simple express server | |
| var express = require('express'); | |
| var app = express(); | |
| var router = express.Router(); | |
| app.use(express.static('public')); | |
| app.get('/', function(req, res) { | |
| res.sendfile('./public/index.html'); |
| class Sortable extends React.Component { | |
| componentDidMount() { | |
| // Every React component has a function that exposes the | |
| // underlying DOM node that it is wrapping. We can use that | |
| // DOM node, pass it to jQuery and initialize the plugin. | |
| // You'll find that many jQuery plugins follow this same pattern | |
| // and you'll be able to pass the component DOM node to jQuery | |
| // and call the plugin function. |
| /* eslint-disable no-console, import/first */ | |
| import path from 'path'; | |
| import express from 'express'; | |
| import expressStaticGzip from 'express-static-gzip'; | |
| import graphqlHTTP from 'express-graphql'; | |
| import PrettyError from 'pretty-error'; | |
| import bodyParser from 'body-parser'; | |
| import raven from 'raven'; | |
| import morgan from 'morgan'; | |
| import { graphqlBatchHTTPWrapper } from 'react-relay-network-layer'; |
| let relayStore; | |
| function relayCreateStore() { | |
| const env = new Relay.Environment(); | |
| env.injectNetworkLayer(new Relay.DefaultNetworkLayer('/graphql')); | |
| if (__DEV__) { | |
| RelayNetworkDebug.init(env); | |
| } | |
| env.reset = () => relayCreateStore(); | |
| env.mutate = ({ | |
| query, |
| import React from 'react'; | |
| import Relay from 'react-relay'; | |
| import { relayStore } from 'app/clientStores'; // relayStore = Relay.Store; | |
| import App from 'app/_components/App/App'; | |
| import Menu from 'app/Menu/Menu'; | |
| import MainPage from 'app/MainPage/MainPage'; | |
| import Page404 from 'app/_components/Page404/Page404'; | |
| import LoadingPage from 'app/_components/LoadingPage/LoadingPage'; | |
| import BrokenPage from 'app/_components/BrokenPage/BrokenPage'; |