2.0.1 • Published 5 years ago

occam-server v2.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Server

Occam's server portion.

Contents

Introduction

A bare-bones Express server that acts as a proxy for Occam's file system functionality.

Installation

With npm:

npm install occam-server

You can also clone the repository with Git...

git clone https://github.com/jecs-imperial/occam-server.git

...and then install the necessary modules with npm from within the project's root directory:

npm install

You will need to do this if you want to look at the examples.

Usage

const server = require('occam-server'),
      necessary = require('necessary');

...

const options = {
  port,
  fileSystemHost,
  publicDirectoryPath,
  templateDirectoryPath
};

start(options, pathResolver, function() {
  ...

  stop(function() {
    ...
  });
});

function pathResolver(relativePath) {
  ...

  return absolutePath;
}

Note that the NodeJS path.resolve() function is fine as a default path resolver.

Building

Automation is done with npm scripts, have a look at the package.json file. The pertinent commands are:

npm run build-debug
npm run watch-debug

Contact

2.0.1

5 years ago

2.0.0

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.5

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago