This file contains hidden or 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
// file: lib/middleware-joi-validator/index.js | |
const Joi = require('@hapi/joi'); | |
const validate = (schema, options) => { | |
options = options || {} | |
const validateRequest = (req, res, next) => { | |
const toValidate = {} | |
if (!schema) { |
This file contains hidden or 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
/** | |
* GET / | |
*/ | |
exports.index = function (req, res) { | |
jiraResponse(req.params.key); | |
res.render('story', { | |
//title: jiraResponse(req.params.key) | |
}); |
This file contains hidden or 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
import React from 'react'; | |
import { browserHistory, IndexRoute, Router, Route } from 'react-router'; | |
import Layout from './views/layout'; | |
import Home from './views/home'; | |
import Doc from './views/doc'; | |
const Routes = () => ( | |
<Router history={browserHistory}> | |
<Route path='/' component={Layout}> |
This file contains hidden or 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
/** | |
* Color | |
* | |
* @author: Rafael Pegorari <[email protected]> | |
* @copyright Copyright (c) 2015-2017, MEANStack.io. | |
* @license See LICENSE | |
* MIT Licensed | |
*/ | |
'use strict'; |
This file contains hidden or 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
/** | |
* Install Gulp in Global | |
* $ npm install gulp -g | |
* | |
* Install Gulp in local | |
* $ npm install gulp --save-dev | |
* | |
* Install dependecies Gulp | |
* $ npm install gulp-concat gulp-uglify gulp-sourcemaps --save-dev | |
* |
This file contains hidden or 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 router = require('meanstack').Router(), | |
auth = require('modules/auth'), | |
Model = require('app/models/model'); | |
/* | |
Method Route Action Return Description Resource AngularJS | |
GET /article index Html Articles index. --- | |
GET /article/load load Action Load articles. query({action: 'load'}... ) |
This file contains hidden or 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 getParam = function (param) { | |
var url = window.location.search.substring(1), | |
params = url.split("&"), | |
val = ''; | |
$.each(params, function (i, v) { | |
var pair = v.split("="); | |
if (pair[0] == param) { | |
val = pair[1]; | |
} | |
}); |
This file contains hidden or 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
$.validator.setDefaults({ | |
debug: !0, | |
errorClass: "has-error", | |
highlight: function (a, b) { | |
$(a).closest("div").addClass(b); | |
}, | |
unhighlight: function (a, b) { | |
$(a).closest("div").removeClass(b); | |
} | |
}); |
This file contains hidden or 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
.has-error { | |
position: relative; | |
} | |
.has-error label.has-error { | |
position: absolute; | |
top: 0 !important; | |
background-color: #FFB8B8; | |
right: 0 !important; | |
left: auto !important; |
NewerOlder