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
angular.module('shortly.services', []) | |
// use of arrow functions seems to break the Angular API | |
.factory('Links', function($http){ | |
const addOne = url => $http({ | |
method: 'POST', | |
url: '/api/links', | |
data: { | |
url: url | |
} |
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
angular.module('shortly.services', []) | |
// use of arrow functions seems to break the Angular API | |
.factory('Links', ($http) => { | |
const addOne = url => $http({ | |
method: 'POST', | |
url: '/api/links', | |
data: { | |
url: url | |
} |
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'; | |
var gulp = require('gulp'); | |
var clean = require('gulp-clean'); | |
var babel = require('gulp-babel'); | |
var nodemon = require('gulp-nodemon'); | |
var KarmaServer = require('karma').Server; | |
var browserSync = require('browser-sync').create(); | |
// The paths to our app files | |
var paths = { |
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 Server = require('./server.js') | |
const port = (process.env.PORT || 8080) | |
const app = Server.app() | |
if (process.env.NODE_ENV !== 'production') { | |
const webpack = require('webpack') | |
const webpackDevMiddleware = require('webpack-dev-middleware') | |
const webpackHotMiddleware = require('webpack-hot-middleware') | |
const config = require('../webpack.deployment.config.js') | |
const compiler = webpack(config) |
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 path = require('path') | |
const express = require('express') | |
module.exports = { | |
app: function () { | |
const app = express(); | |
const indexPath = path.join(__dirname, 'indexDep.html'); | |
const publicPath = express.static(path.join(__dirname, '../dist')); | |
app.use('/dist', publicPath); |
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
Show hidden characters
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"plugins": ["react"], | |
"parserOptions": { |
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 path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
entry: './app/index.js', | |
output: { | |
path: __dirname, | |
filename: 'bundle.js', | |
publicPath: '/app/assets/' | |
}, |
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 path = require('path'); | |
const webpack = require('webpack'); | |
module.exports = { | |
devtool: 'source-map', | |
entry: [ | |
'./app/index.js' | |
], | |
output: { |
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 path = require('path'); | |
const webpack = require('webpack'); | |
module.exports = { | |
devtool: 'source-map', | |
entry: [ | |
'./app/index.js' | |
], | |
output: { |
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
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"plugins": ["react"], | |
"ecmaFeatures": { |