/test-server

Just a little test project, to serve HTML or Markdown using node type web servers or simply using python SimpleHTTPServer

Primary LanguageShell

Introduction

  • Just a little test project, to serve HTML or Markdown using node type web servers or simply using python SimpleHTTPServer

Requirements

Using http-server

  • npm
  • npm packages:
    • http-server
  • make

Using harp

  • npm
  • npm packages:
    • harp
  • make

Using python SimpleHTTPServer

  • make
  • python (version >= 2.7)

Installation

Using http-server

  • $ npm install

Using harp

  • $ npm install

Using python SimpleHTTPServer

  • There is no pre-use install for this option

Configuration

  • Copy config.ini.example to config.ini $ cp config.ini.example config.ini
  • Edit your new config.ini file for your preferences

Usage

  • Show your options
    $ make
  • Configure your server or create a new config
    $ make config
  • Configure your test suite or create a new test config
    $ make testconfig
  • Run your server
    $ make start
  • Stop your server
    $ make stop
  • Restart your server
    $ make restart
  • Show the PID for the active server
    $ make pid
  • Show any service on the port specified in config.ini
    $ make port
  • Open the default browser with python, to your server
    $ make browse

Testing

  • Run full test suite
    $ make test

TODO List

  • Make configuration editor inside of 'make config'
  • Make configuration editor inside of 'make testconfig'
  • Add testing for each individual method, so that they can be run independent of 'make test'