From 7a62d6e005dd6f4a054c941717643acf5c01ef97 Mon Sep 17 00:00:00 2001 From: brians1123 Date: Sat, 16 Sep 2017 14:55:04 -0400 Subject: [PATCH] tutorial --- index.js | 18 ++++++++++++++++++ package.json | 19 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 index.js create mode 100644 package.json diff --git a/index.js b/index.js new file mode 100644 index 0000000..a2e48a7 --- /dev/null +++ b/index.js @@ -0,0 +1,18 @@ +var express = require('express') +var remarkable = require('express-remarkable') +var app = express() + +app.engine('md', remarkable(app)); +app.set('views', '.'); +app.set('view engine', 'md'); + +function sendWebpage(request, response){ + response.render('README'); +} + +app.get('/', sendWebpage) + +app.listen('3000', () => { + console.log('server is now running'); + console.log('go to http:localhost:3000 to see the output') +}) diff --git a/package.json b/package.json new file mode 100644 index 0000000..0d39324 --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "brian", + "version": "1.0.0", + "description": "This readme will help you get accustomed to the tools that we use at scottylabs.\r Our applications primarily are built with nodejs and python, and we use git\r to collaborate together.", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/brians1123/tutorial.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/brians1123/tutorial/issues" + }, + "homepage": "https://github.com/brians1123/tutorial#readme" +}