Permalink
Browse files

intro to express lab

  • Loading branch information...
ekcs0915 committed Dec 2, 2019
0 parents commit 69085af5861d3df78a2f99a12112af90db4c575e
Showing 923 changed files with 108,461 additions and 0 deletions.
@@ -0,0 +1 @@
intro to express
@@ -0,0 +1,36 @@
let classes = [
{
className: 'mage',
type: ['ranged', 'magic'],
speed: 'medium',
HP: 'low',
inParty: true
},
{
className: 'knight',
type: ['melee', 'weapon'],
speed: 'low',
HP: 'high',
inParty: true
},
{
className: 'archer',
type: ['ranged', 'weapon'],
speed: 'fast',
HP: 'medium',
inParty: true
},
{
className: 'cleric',
type: ['ranged', 'magic'],
speed: 'low',
HP: 'medium',
inParty: true
}
]

module.exports = {
returnFunction: ()=>{
return classes
}
}
No changes.
@@ -0,0 +1,27 @@
let express = require('express')
let path = require('path')
let dataListOne = require('./data/list-one')
let dataListTwo = require('./data/list-two')

let app = express()

app.set('view engine', 'ejs')
app.set('views', path.join(__dirname, 'views'))

app.get('/', (req, res)=>{
res.redirect('/home')
})

app.get('/home', (req, res)=>{
res.render('testHome')
})

app.get('/classlist', (req, res)=>{
res.render('classlist/index',{
classList: dataListOne.returnFunction()
})
})



app.listen(9000)

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 69085af

Please sign in to comment.