Skip to content
This repository has been archived by the owner on Jan 31, 2021. It is now read-only.

Implementation of a webserver using Express (with Nunjucks/Jinja2 templating) in Node.js for the ENGO500 repository

License

Notifications You must be signed in to change notification settings

ThatGeoGuy/ENGO500-Webserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ENGO500-Webserver

Implementation of a webserver using Express (with Nunjucks templating) in Node.js for the ENGO500 repository. This is a very basic webserver, providing simple templating using Nunjucks templating. No database connectivity has been implemented yet, but ideally database access will be added in the future.

Usage

First and foremost, clone the repository and change directories into it:

$ git clone https://github.com/ThatGeoGuy/ENGO500-Webserver.git

$ cd ENGO500-Webserver/

To use this server, you need Node.js version 0.10 or newer installed. You should be able to re-produce or install the remaining dependencies locally using npm install. To start the server, just run:

node server.js

in a new terminal window or pane. The server will then run on port 8000, so visit localhost:8000 to see the site rendered.

Files

Files should be divided as follows:

  • Templates: structured as .html and placed in the views/ folder.
  • Static files: put in their respective folders in the public/ folder. For example, stylesheets can be found in public/css/. Keep in mind that these would be called by pages rendered on the server without the public/ prefix. E.g. <link type='stylesheet' href='/css/demo.css' />

For reference on static files, there are several demo files added to this project.

Acknowledgements

About

Implementation of a webserver using Express (with Nunjucks/Jinja2 templating) in Node.js for the ENGO500 repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •