Giter Site home page Giter Site logo

staticcontentchallenge's Introduction

Static Content challenge - mid-level

NB: Please do not fork this repository, to avoid your solution being visible from this repository's GitHub page. Please clone this repository and submit your solution as a separate repository.

Business Scenario: Acme Co's marketing department want a simple content management system and you've been tasked with building the MVP.

The challenge here is to create a node.js application that displays HTML pages at URLs that match the paths of the folders and sub-folders in the content folder. The content of these pages should come from a combination of the template HTML file and a markdown file containing the content.

For example, for a folder called about-page, a request to /about-page would return a HTML page created from the template.html template and the about-page/index.md content file. The template.html file contains a {{content}} placeholder that would be replaced by the content for each page. A request to /blog/june/company-update would return a HTML page using the content file at blog/june/company-update/index.md.

Acme's marketing department should be able to add extra folders to the content folder and the application should work with those without any requiring any code changes.

This repository contains a template.html template file and a sample content folder with sub-folders containing index.md markdown files (or other sub-folders).

Your application may make use of open-source code libraries. It is entirely up to you how the application performs the challenge.

Testing

The application should be shipped with three tests:

  • one that verifies that requests to valid URLs return a 200 HTTP status code
  • one that verifies that requests to valid URLs return a body that contains the HTML generated from the relevant index.md markdown file
  • one that verifies that requests to URLs that do not match content folders return a 404 HTTP status code
  • NB: the tests should not depend on the existing sub-folders in the content folder, so the tests do not break as the content changes

Bonus credit

In this MVP sprint, there are two nice-to-have tickets:

  • The generated HTML page should be styled in a pleasing way
  • The MVP's GitHub repository should be configured for hosting on a cloud hosting service, and include a link to a live deployment

The app is hosted on Heroku and accessible through this link

staticcontentchallenge's People

Contributors

alessandrofannolo avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar Alessandro Fan 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.