apolitical-server

Node.js module to encapsulate Apolitical's express server setup

Usage no npm install needed!

<script type="module">
  import apoliticalServer from 'https://cdn.skypack.dev/apolitical-server';
</script>

README

Apolitical Server

Node.js module to encapsulate Apolitical's express server setup

Requirements

Requires the following to run:

Installation

Install with yarn:

yarn add apolitical-server

Usage

The recommended way to use apolitical-server is to start your own server with the appropriate parameters:

const apoliticalServer = require('apolitical-server');

(async function quickstart() {  
  // Start the server
  const app = await apoliticalServer.start({ port: 8080 });
  /******************************
   * Do something with your app 
   ******************************/
  // Stop the server
  await apoliticalServer.stop();
})();