Coder Social home page Coder Social logo

zmattis / personal-website Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devoncrawford/personal-website

0.0 1.0 0.0 254.42 MB

Node js version of my personal website. This is still in early development and is not the live version of the site.

JavaScript 23.73% CSS 16.17% PHP 0.68% HTML 59.42%

personal-website's Introduction

Personal-Website

Node js version of my personal website. This is still in early development and is not the live version of the site.

Get started

  • Install node js on your machine
  • cd to root directory, type "npm install" for dependencies
  • type "npm run dev" to start the server
  • Go to http://localhost:8080

Main server file

app.js

Routing

All api requests go through /api/

All front end and static requests go through / (root)

Meaning if you go to localhost:8080/software it will take you to the software page with html, css, javascript etc.. but if you go to localhost:8080/api/software it will not grab html.. the route assumes you are trying to access an api functionality

HTML Pages

All html pages are in the /views/pages/ directory. These are ejs files which call partials in ejs to include html in other pages.

Static Files (CSS, Javascript)

/static/ directory

When an html page links to a stylesheet or some script, express serves the Static files in the /static/ directory within the same direcory it is called inside of the /views/pages/ direcory.

For example:

/views/pages/software/index.ejs has a stylesheet href="css/page.css"

Since express serves our static files for us it actually grabs the css from

/static/software/css/page.css

This makes it easy to use relative addresses in hrefs of html files, so long as you continue this directory structure of placing static files in /static directory and the html in the views/pages/ directory and the reusable html in the /views/partials/ directory

personal-website's People

Contributors

devoncrawford avatar boydbloemsma avatar xperiall avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.