This package has been deprecated

Author message:

This package has been migrated into the 'appium-base-driver' package

appium-express

1.2.4 • Public • Published

appium-express

Build Status Coverage Status

Express server tuned for to serve Appium.

Configuration

The appium-express server comes configured with:

  1. appropriate logging formats
  2. service of necessary static assets
  3. allowance of cross-domain requests
  4. default error handling
  5. fix for invalid content types sent by certain clients

To configure routes, a function that takes an Express server is passed into the server. This function can add whatever routes are wanted.

Usage

import server from 'appium-express';
 
 
// configure the routes
function configureRoutes (app) {
  app.get('/hello', (req, res) => {
    res.header['content-type'] = 'text/html';
    res.status(200).send('Hello');
  });
  app.get('/world', (req, res) => {
    res.header['content-type'] = 'text/html';
    res.status(200).send('World');
  });
}
 
let port = 5000;
let host = 'localhost';
 
let appiumServer = await server(configureRoutes, port, host);

Watch

npm run watch

Test

npm test

Readme

Keywords

Package Sidebar

Install

npm i appium-express

Weekly Downloads

31

Version

1.2.4

License

Apache-2.0

Last publish

Collaborators

  • jlipps
  • nick.mokhnach
  • kazucocoa
  • boneskull
  • imurchie
  • bootstraponline
  • dangraham