Initial commit from Gomix.

This commit is contained in:
System 2017-02-18 18:41:37 +00:00
parent 51706d8b6a
commit 45a0ca7816
7 changed files with 199 additions and 2 deletions

54
.hyperdev-assets Normal file
View File

@ -0,0 +1,54 @@
{"name":"drag-in-files-copy.svg","date":"2016-03-16T18:27:31.021Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files-copy.svg","type":"image/svg+xml","size":6229,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files-copy.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(100,156,204)","uuid":"tkviVwlaQ2RryM4r"}
{"name":"drag-in-files.svg","date":"2016-03-16T18:21:25.984Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","type":"image/svg+xml","size":7990,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(100,156,204)","uuid":"Pr0LH5dpGcRJ2QSU"}
{"name":"click-for-details.svg","date":"2016-03-16T18:21:23.511Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","type":"image/svg+xml","size":6408,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(244,188,188)","uuid":"nuMndaSEzn2KoNFG"}
{"name":"use-url.svg","date":"2016-03-16T18:21:20.130Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fuse-url.svg","type":"image/svg+xml","size":6155,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fuse-url.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(44,180,188)","uuid":"LiyD5Lxg8FrmZlhz"}
{"name":"click-for-details.svg","date":"2016-03-16T18:20:57.943Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","type":"image/svg+xml","size":6408,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(244,188,188)","uuid":"04MB8gA2GPoSJ7pp"}
{"name":"drag-in-files.svg","date":"2016-03-16T18:20:56.379Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","type":"image/svg+xml","size":7990,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(100,156,204)","uuid":"q8Au1vYvVFpuGd5b"}
{"name":"use-url.svg","date":"2016-03-16T18:20:52.651Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fuse-url.svg","type":"image/svg+xml","size":6155,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fuse-url.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(44,180,188)","uuid":"9FiKvjvvr4C3oG0i"}
{"name":"1.svg","date":"2016-03-16T18:18:11.204Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2F1.svg","type":"image/svg+xml","size":20524,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2F1.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(100,156,204)","uuid":"MR02bReHwXODf2iH"}
{"name":"2.svg","date":"2016-03-16T18:18:09.776Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2F2.svg","type":"image/svg+xml","size":6597,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2F2.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(244,188,188)","uuid":"Q5gjW3biIe5ubDSw"}
{"name":"3.svg","date":"2016-03-16T18:18:08.145Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2F3.svg","type":"image/svg+xml","size":6856,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2F3.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(44,180,188)","uuid":"ZtH2QDmOOe11lCXh"}
{"name":"drag-in-files.svg","date":"2016-03-16T18:15:33.737Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","type":"image/svg+xml","size":7990,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(100,156,204)","uuid":"5ZhCFJBZeljgrOsm"}
{"name":"click-for-details.svg","date":"2016-03-16T18:15:31.732Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","type":"image/svg+xml","size":6408,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(244,188,188)","uuid":"j9DYGSrBdfoh5Qgf"}
{"name":"drag-in-files.svg","date":"2016-03-16T18:13:11.062Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","type":"image/svg+xml","size":7990,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(100,156,204)","uuid":"xs11lHNV40rcZiOr"}
{"name":"click-for-details.svg","date":"2016-03-16T18:13:07.869Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","type":"image/svg+xml","size":6397,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(244,188,188)","uuid":"oDrtrMLQDzHj3fCi"}
{"name":"drag-in-files.svg","date":"2016-03-16T18:12:09.577Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","type":"image/svg+xml","size":7990,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(100,156,204)","uuid":"QZQEhdAJwQlN15xh"}
{"name":"click-for-details.svg","date":"2016-03-16T18:12:06.958Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","type":"image/svg+xml","size":6395,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(244,188,188)","uuid":"4DsIsyOkpGM5vhnm"}
{"name":"use-url.svg","date":"2016-03-16T18:12:02.187Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fuse-url.svg","type":"image/svg+xml","size":6155,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fuse-url.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(44,180,188)","uuid":"2D0DVLCP7wUxzaXm"}
{"name":"click-for-details.svg","date":"2016-03-16T18:11:49.564Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","type":"image/svg+xml","size":6395,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(244,188,188)","uuid":"ellCYXezSjscGSrr"}
{"name":"drag-in-files.svg","date":"2016-03-16T18:11:44.256Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","type":"image/svg+xml","size":7990,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(100,156,204)","uuid":"96WPtGmfDbGjk1Cq"}
{"name":"drag-in-files.svg","date":"2016-03-16T18:11:25.392Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","type":"image/svg+xml","size":7990,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(100,156,204)","uuid":"w2iCDrwXU3boaMb0"}
{"uuid":"w2iCDrwXU3boaMb0","deleted":true}
{"uuid":"ellCYXezSjscGSrr","deleted":true}
{"uuid":"96WPtGmfDbGjk1Cq","deleted":true}
{"uuid":"4DsIsyOkpGM5vhnm","deleted":true}
{"uuid":"QZQEhdAJwQlN15xh","deleted":true}
{"uuid":"oDrtrMLQDzHj3fCi","deleted":true}
{"uuid":"xs11lHNV40rcZiOr","deleted":true}
{"uuid":"5ZhCFJBZeljgrOsm","deleted":true}
{"uuid":"j9DYGSrBdfoh5Qgf","deleted":true}
{"uuid":"2D0DVLCP7wUxzaXm","deleted":true}
{"uuid":"04MB8gA2GPoSJ7pp","deleted":true}
{"uuid":"q8Au1vYvVFpuGd5b","deleted":true}
{"uuid":"MR02bReHwXODf2iH","deleted":true}
{"uuid":"9FiKvjvvr4C3oG0i","deleted":true}
{"uuid":"ZtH2QDmOOe11lCXh","deleted":true}
{"uuid":"Q5gjW3biIe5ubDSw","deleted":true}
{"uuid":"Pr0LH5dpGcRJ2QSU","deleted":true}
{"uuid":"tkviVwlaQ2RryM4r","deleted":true}
{"uuid":"LiyD5Lxg8FrmZlhz","deleted":true}
{"uuid":"nuMndaSEzn2KoNFG","deleted":true}
{"name":"use-url.svg","date":"2016-03-29T18:22:42.337Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fuse-url.svg","type":"image/svg+xml","size":12848,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fuse-url.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(44,180,188)","uuid":"BPzdWy4z8l1Yn4EQ"}
{"name":"drag-in-files.svg","date":"2016-03-29T18:22:44.084Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","type":"image/svg+xml","size":14823,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(100,156,204)","uuid":"VQVhKMzbgQcBopQk"}
{"uuid":"BPzdWy4z8l1Yn4EQ","deleted":true}
{"uuid":"VQVhKMzbgQcBopQk","deleted":true}
{"name":"click-for-details.svg","date":"2016-03-29T18:22:55.141Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","type":"image/svg+xml","size":12623,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(244,188,188)","uuid":"QTRGE6XDqUiSoYO9"}
{"name":"drag-in-files.svg","date":"2016-03-29T18:22:57.596Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","type":"image/svg+xml","size":14823,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(100,156,204)","uuid":"RS7rnVaX9eGP4Lri"}
{"uuid":"RS7rnVaX9eGP4Lri","deleted":true}
{"uuid":"QTRGE6XDqUiSoYO9","deleted":true}
{"name":"drag-in-files.svg","date":"2016-03-29T18:23:08.746Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","type":"image/svg+xml","size":14823,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fdrag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(100,156,204)","uuid":"fxoJRXwNdZeThuNz"}
{"name":"click-for-details.svg","date":"2016-03-29T18:23:10.422Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","type":"image/svg+xml","size":12623,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fclick-for-details.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(244,188,188)","uuid":"Lp2si7Cpft2ktNM4"}
{"name":"use-url.svg","date":"2016-03-29T18:23:12.439Z","url":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fuse-url.svg","type":"image/svg+xml","size":12848,"imageWidth":276,"imageHeight":276,"thumbnail":"https://s3.amazonaws.com/hyperweb-editor-assets/us-east-1%3Ad0d03a8e-22bf-451d-ba15-f08d8f4e99ba%2Fuse-url.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(44,180,188)","uuid":"EjI8Y9wdZ9DEXI17"}
{"name":"ts.png","date":"2016-07-29T20:12:54.081Z","url":"https://cdn.hyperdev.com/us-east-1%3A52a203ff-088b-420f-81be-45bf559d01b1%2Fts.png","type":"image/png","size":51415,"imageWidth":300,"imageHeight":300,"thumbnail":"https://cdn.hyperdev.com/us-east-1%3A52a203ff-088b-420f-81be-45bf559d01b1%2Fts.png","thumbnailWidth":300,"thumbnailHeight":300,"dominantColor":null,"uuid":"KkT0yh4eO6qQ0IoB"}
{"name":"favicon.ico","date":"2016-07-29T20:16:10.860Z","url":"https://cdn.hyperdev.com/us-east-1%3A52a203ff-088b-420f-81be-45bf559d01b1%2Ffavicon.ico","type":"image/vnd.microsoft.icon","size":3262,"imageWidth":32,"imageHeight":32,"thumbnail":"https://cdn.hyperdev.com/us-east-1%3A52a203ff-088b-420f-81be-45bf559d01b1%2Ffavicon.ico","thumbnailWidth":32,"thumbnailHeight":32,"dominantColor":"rgb(202,221,202)","uuid":"D1EJusUtfCMrDlM2"}
{"uuid":"KkT0yh4eO6qQ0IoB","deleted":true}

View File

@ -1,2 +1 @@
# boilerplate-express
A boilerplate for the freeCodeCamp curriculum.
# Backend Challenges Boilerplate - Basic Express

57
myApp.js Normal file
View File

@ -0,0 +1,57 @@
var express = require('express');
var app = express();
// --> 7) Mount the Logger middleware here
// --> 11) Mount the body-parser middleware here
/** 1) Meet the node console. */
/** 2) A first working Express Server */
/** 3) Serve an HTML file */
/** 4) Serve static assets */
/** 5) serve JSON on a specific route */
/** 6) Use the .env file to configure the app */
/** 7) Root-level Middleware - A logger */
// place it before all the routes !
/** 8) Chaining middleware. A Time server */
/** 9) Get input from client - Route parameters */
/** 10) Get input from client - Query parameters */
// /name?first=<firstname>&last=<lastname>
/** 11) Get ready for POST Requests - the `body-parser` */
// place it before all the routes !
/** 12) Get data form POST */
// This would be part of the basic setup of an Express app
// but to allow FCC to run tests, the server is already active
/** app.listen(process.env.PORT || 3000 ); */
//---------- DO NOT EDIT BELOW THIS LINE --------------------
module.exports = app;

17
package.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "fcc-learn-node-with-express",
"version": "0.1.0",
"dependencies": {
"express": "^4.14.0",
"body-parser": "^1.15.2",
"cookie-parser": "^1.4.3",
"fcc-express-bground": "https://github.com/Em-Ant/fcc-express-bground-pkg.git"
},
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"engines": {
"node": "4.4.5"
}
}

16
public/style.css Normal file
View File

@ -0,0 +1,16 @@
/* the 'body' selector is required for the tests to pass */
/* You can change the style attributes if you want */
body {
background-color: #222;
color: #ddd;
text-align: center;
font-family: sans-serif;
}
h1 {
font-size: 4em;
}
input[type=text], label {
margin-bottom: 8px;
}

33
server.js Normal file
View File

@ -0,0 +1,33 @@
/******************************************************
* PLEASE DO NOT EDIT THIS FILE
* the verification process may break
* ***************************************************/
var bGround = require('fcc-express-bground');
var myApp = require('./myApp');
var express = require('express');
var app = express();
if (!process.env.DISABLE_XORIGIN) {
app.use(function(req, res, next) {
var allowedOrigins = ['https://narrow-plane.gomix.me', 'https://www.freecodecamp.com'];
var origin = req.headers.origin || '*';
if(!process.env.XORIG_RESTRICT || allowedOrigins.indexOf(origin) > -1){
console.log(origin);
res.setHeader('Access-Control-Allow-Origin', origin);
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
}
next();
});
}
var port = process.env.PORT || 3000;
bGround.setupBackgroundApp(app, myApp, __dirname).listen(port, function(){
bGround.log('Node is listening on port '+ port + '...')
});
/******************************************************
* PLEASE DO NOT EDIT THIS FILE
* the verification process may break
* ***************************************************/

21
views/index.html Normal file
View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Hello HTML</title>
<link rel="stylesheet" href="/style.css">
</head>
<body>
<h1>Hello, HTML.</h1>
<p>Do not use until Challenge #12</p>
<form action="/name" method="post">
<label>First Name :</label>
<input type="text" name="first" value="John"><br>
<label>Last Name :</label>
<input type="text" name="last" value="Doe"><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>