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
import bcrypt | |
class User(db.Model): | |
"""User of website.""" | |
__tablename__ = "users" | |
user_id = db.Column(db.Integer, autoincrement=True, primary_key=True) | |
email = db.Column(db.String(70), nullable=False) | |
password_hash = db.Column(db.String(60), nullable=False) |
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
import os | |
accessToken = os.environ["MAPBOX_API_KEY"] | |
@app.route('/route_directions') | |
def get_directions_geojson(): | |
"""Get directions via Mapbox Directions API with all the waypoints in the session.""" | |
waypoints = session['waypoints'] | |
route_list = [] |
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
module.exports = { | |
entry: "./app/components/Main.js", | |
output: { | |
filename: "public/bundle.js" | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.jsx?$/, | |
exclude: /(node_modules|bower_components)/, |
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
<!doctype HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Getting Started with React and Webpack</title> | |
</head> | |
<body> | |
<div id="app"></div> |
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 React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var Main = React.createClass({ | |
render: function() { | |
return ( | |
<div> | |
Hello World | |
</div> | |
) |
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 express = require('express'); | |
var request = require('request'); | |
var bodyParser = require('body-parser'); | |
var key = require('../secrets.js'); | |
var app = express(); | |
// allow CORS access | |
app.use(function(req, res, next) { | |
res.header("Access-Control-Allow-Origin", "*"); |
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
// Load the JSON Schema | |
const customerSchema = JSON.parse(environment.customerSchema); | |
// Test whether the response matches the schema | |
var customer = JSON.parse(responseBody); | |
tests["Customer is valid"] = tv4.validate(customer, customerSchema); |
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 secret = require('./secrets.js'); | |
module.exports = { | |
"collections": [ | |
{ | |
"from": "swagger", | |
"to": "postman-collection", | |
"name": "Swagger Petstore", | |
"collection_uid": "1559979-81f30228-c4e1-8a05-948a-da9cc9bd07db", | |
"collection_id": "81f30228-c4e1-8a05-948a-da9cc9bd07db" |
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 fs = require('fs'), | |
Converter = require('swagger2-postman2-converter'), | |
request = require('request'), | |
config = require('./config.js'); | |
// ############################################### | |
// define functions to handle conversion and update collection | |
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
language: node_js | |
node_js: | |
- "8.2.1" | |
install: | |
- npm install newman | |
before_script: | |
- node --version | |
- npm --version |
OlderNewer