Skip to content

Commit

Permalink
Merge pull request #3 from dionyziz/basic_express
Browse files Browse the repository at this point in the history
Add basic express app structure
  • Loading branch information
cnasikas authored May 19, 2018
2 parents 277381a + 8517ba8 commit dfd9ec0
Show file tree
Hide file tree
Showing 7 changed files with 8,044 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
# dependencies
node_modules

# dependencies
node_modules/

# testing
coverage/

# production
build/

# misc
*.log*
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Blockchain course
# Introduction to Blockchains

An interactive course on blockchain science and engineering
This repository contains the material for our [Introduction to
Blockchains](https://blockchain-course.org) course.

You can take the course online at
[blockchain-course.org](https://blockchain-course.org/).
16 changes: 16 additions & 0 deletions api/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require('dotenv').config()

const LISTEN_PORT = process.env.PORT || 3000
const winston = require('winston')
const express = require('express')
const bodyParser = require('body-parser')
const routes = require('./routes/routes.js')
const app = express()

app.use(bodyParser.json())
app.use(bodyParser.urlencoded())
app.use('/', routes)

const server = app.listen(LISTEN_PORT, () => {
winston.info('Blockchain Course API server running on port ' + LISTEN_PORT)
})
Loading

0 comments on commit dfd9ec0

Please sign in to comment.