81 lines
3.4 KiB
TypeScript
81 lines
3.4 KiB
TypeScript
import path from 'path';
|
|
import express from 'express';
|
|
import mime from 'mime';
|
|
|
|
const app = express();
|
|
|
|
app.get('/', (req, res) => {
|
|
res.render('index.ejs', {
|
|
title: 'Home',
|
|
business: {
|
|
location: 'Winnipeg, MB'
|
|
}
|
|
});
|
|
});
|
|
|
|
app.get('/about', (req, res) => {
|
|
res.render('about.ejs', {
|
|
title: 'About',
|
|
people: [
|
|
{
|
|
fname: 'Alan',
|
|
lname: 'Bridgeman',
|
|
position: 'Proprietor, CEO & Lead Developer',
|
|
bio: '' +
|
|
'Alan has been an avid disability advocate for over a decade including being a part of or involved with a variety of civic, provincial, national and international organizations around disability or accessibility. ' +
|
|
'Alan has held numerous certifications including but not limited to: Mental Health First Aid, Certified Professional in Accessibility Core Competinies (CPACC) with the International Association of Accessibility Professionals (IAAP), among others. ' +
|
|
'In additioan to his involvment in the disability community Alan is a dedicated and passionate software developer with a significant amount of experience in the industry. ' +
|
|
'He has worked on a wide variety of projects, from small websites for research teams and non-profits to large enterprise applications at fourtune 500 companites like Microsoft. ' +
|
|
'He has a strong background in web and cloud development, but has also worked on desktop and mobile applications. He has worked with many different technologies, including C#, Python, JavaScript, TypeScript, React, Node.js, Java, and many more. ' +
|
|
'Alan startecd Bridgeman Accessible because he saw over and over again companies that were lead by non-disabled people and non-developers trying to solve digital accessibility problems. ' +
|
|
'Moreover, they would only every consult or give advice but never build or innovate in ways that would help the community and the industry in a meaningful and impactful way.',
|
|
image: 'alan.jpeg',
|
|
website: 'https://alanbridgeman.ca/',
|
|
email: 'alan@alanbridgeman.ca'
|
|
},
|
|
//{
|
|
// fname: 'John',
|
|
// lname: 'Oberton',
|
|
// position: 'Infrastructure Developer (Project by Project basis/Contract)'
|
|
//},
|
|
//{
|
|
// fname: 'Trevor',
|
|
// lname: 'Xie',
|
|
// position: 'Designer (Project by Project basis/Contract)'
|
|
//}
|
|
]
|
|
});
|
|
});
|
|
|
|
app.get('/services', (req, res) => {
|
|
res.render('services.ejs', {
|
|
title: 'Services'
|
|
});
|
|
});
|
|
|
|
app.get('/products', (req, res) => {
|
|
res.render('products.ejs', {
|
|
title: 'Products'
|
|
});
|
|
});
|
|
|
|
app.set('view engine', 'ejs');
|
|
app.set('views', path.join(__dirname, 'views'));
|
|
|
|
app.use(express.static(path.join(__dirname, 'public'), {
|
|
setHeaders: (res, path) => {
|
|
if (mime.getType(path) === 'text/html') {
|
|
res.setHeader('Content-Type', 'text/html');
|
|
}
|
|
else if (mime.getType(path) === 'text/css') {
|
|
res.setHeader('Content-Type', 'text/css');
|
|
}
|
|
else if (mime.getType(path) === 'application/javascript') {
|
|
res.setHeader('Content-Type', 'application/javascript');
|
|
}
|
|
}
|
|
}));
|
|
|
|
app.listen(3000, () => {
|
|
console.log('Server is running on port 3000');
|
|
});
|