# occam-server

> Occam's server side functionality.

Latest version **7.0.120** (published 2026-10-03) · MIT, Anti-996 license · 0 weekly downloads

## Install

```sh
npm install occam-server
pnpm add occam-server
yarn add occam-server
bun add occam-server
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 7.0.120 |
| Published | 2026-10-03 |
| First published | 2019-04-27 |
| Weekly downloads | 0 |
| License | MIT, Anti-996 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 136.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | James Smith |
| Maintainers | djalbat |

## Links

- npm: https://www.npmjs.com/package/occam-server
- Repository: https://github.com/djalbat/occam-server
- Issues: https://github.com/djalbat/occam-server/issues
- npm.io page: https://npm.io/package/occam-server

## Dependencies (2)

- [necessary](https://npm.io/package/necessary.md) ^17.7.2
- [occam-model](https://npm.io/package/occam-model.md) ^1.0.620

## Recent versions

- 7.0.120 (latest) — 2026-10-03
- 7.0.119 — 2026-10-02
- 7.0.118 — 2026-10-02
- 7.0.117 — 2026-10-02
- 7.0.116 — 2026-09-29
- 7.0.115 — 2026-09-29
- 7.0.114 — 2026-09-28
- 7.0.113 — 2026-09-27
- 7.0.112 — 2026-09-27
- 7.0.111 — 2026-09-27
- 7.0.110 — 2026-09-27
- 7.0.109 — 2026-09-27
- 7.0.108 — 2026-09-26
- 7.0.106 — 2026-09-24
- 7.0.105 — 2026-09-24
- … 114 more at https://npm.io/package/occam-server/versions

## README

# Occam Server

[Occam](https://github.com/djalbat/occam)'s server side functionality.

### Contents

- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
- [Building](#building)
- [Contact](#contact)

## Introduction

The Occam IDE's server functionality.

## Installation

With [npm](https://www.npmjs.com/):

    npm install occam-server

You can also clone the repository with [Git](https://git-scm.com/)...

    git clone https://github.com/djalbat/occam-server.git

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

    npm install

## Usage

The exported functions are:

* `loadFile()`
* `saveFile()`
* `loadFiles()`
* `loadProject()`
* `loadRelease()`
* `loadProjects()`
* `loadReleases()`
* `removeRelease()`
* `moveProjectEntries()`
* `removeProjectEntries()`
* `renameProjectEntries()`
* `createProjectEntries()`

Soem utility functions are also exported. See the source for details.

Typical usage is as follows:

```
const open = require('occam-open-cli'), ///
      server = require('occam-server'); ///

const { Files } = open,
      { loadFiles } = server;

const filePaths = ...,
      projectsDirectoryPath = ...,
      json = {
        filePaths
      };

loadFiles(projectsDirectoryPath, json, function(json) {
  const files = (json !== null) ?
                  Files.fromJSON(json) :
                    null;

  ...
});
```

Note that you get JSON back, not an instance of the `Files` class, and that JSON might be `null`.

## Building

Automation is done with [npm scripts](https://docs.npmjs.com/misc/scripts), have a look at the `package.json` file. The pertinent commands are:

    npm run build-debug
    npm run watch-debug

## Contact

* james.smith@djalbat.com

---
_Source: https://npm.io/package/occam-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
