open-index/open-npm huggingface dataset:
npm package: 4finance-redirect-url
Description: Implements express middleware for redirections
Author: 4FinanceIT
Latest version: 0.2.1

# Redirect URL

Redirect URL is an express middleware for redirection with slashes at the end of the URL path and for redirecting old urls by new ones.

Old to new URL redirections should be used in older projects where contentful redirections are not present.

```
yarn add 4finance-redirect-url
```

# Motivation

We would like to be able to use an unified workflow for redirections.

# How to use

To use Redirect URL you need just to import `fillSlash` and `redirect`  to use it as an express middleware. For client side, import `withSlashes` and wrap router history with that.

# Example

client.js
```js
...
import { withSlashes } from '4finance-redirect-url';

const appHistory = withSlashes(useRouterHistory(createBrowserHistory)());
...
```

server.js
```js
...
import { fillSlash, redirect } from '4finance-redirect-url'

const redirections = {
  '/old-url/': '/new-url/',
};
const app = express();

app.use(redirect(redirections));
app.use(fillSlash);
...
```

# Changelog

0.2.1 - Fix not sending next after redirect
0.2.0 - Add fillSlashWithIgnore method for adding slashes at the end of the url but keep url from ignore list without change
## 0.2.*

0.1.1 - Fix path in redirection
0.1.0 - Add support for client side slash inserting
## 0.1.*
npm package: 4front-apphost
Description: Virtual app host container for multi-tenant container.
Author: David Von Lehman
Latest version: 1.0.17

# 4front-apphost

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]

![http://www.4front.io](https://s3-us-west-2.amazonaws.com/4front-media/4front-logo.png)

Multi-tenant virtual app host container for 4front. Learn more at: [www.4front.io](http://www.4front.io)

## License
Licensed under the Apache License, Version 2.0. See the top-level file LICENSE.txt and (http://www.apache.org/licenses/LICENSE-2.0).

[npm-image]: https://img.shields.io/npm/v/4front-apphost.svg?style=flat
[npm-url]: https://npmjs.org/package/4front-apphost
[travis-image]: https://img.shields.io/travis/4front/apphost.svg?style=flat
[travis-url]: https://travis-ci.org/4front/apphost
[coveralls-image]: https://img.shields.io/coveralls/4front/apphost.svg?style=flat
[coveralls-url]: https://coveralls.io/r/4front/apphost?branch=master
[downloads-image]: https://img.shields.io/npm/dm/4front-apphost.svg?style=flat
[downloads-url]: https://npmjs.org/package/4front-apphost
npm package: 4front-cli
Description: CLI interface for the 4front multi-tenant web hosting platform
Author: David Von Lehman
Latest version: 0.0.20

# 4front-cli

<!-- [![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
-->
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]

![http://www.4front.io](https://s3-us-west-2.amazonaws.com/4front-media/4front-logo.png)

Command line interface for the 4front multi-tenant web app platform. Includes a set of developer tools for performing tasks such as creating apps, deploying apps, running a development sandbox environment, setting environment variables and more. Learn more at: [4front.io](http://4front.io)

## License
Licensed under the Apache License, Version 2.0. See (http://www.apache.org/licenses/LICENSE-2.0).

<!-- [npm-image]: https://img.shields.io/npm/v/4front-cli.svg?style=flat
[npm-url]: https://npmjs.org/package/4front-cli
-->
[travis-image]: https://img.shields.io/travis/4front/cli.svg?style=flat
[travis-url]: https://travis-ci.org/4front/cli
[coveralls-image]: https://img.shields.io/coveralls/4front/cli.svg?style=flat
[coveralls-url]: https://coveralls.io/r/4front/cli?branch=master
<!--
[downloads-image]: https://img.shields.io/npm/dm/4front-cli.svg?style=flat
[downloads-url]: https://npmjs.org/package/4front-cli -->
npm package: 4front-logger
Description: Bunyan based logger for 4front
Author: David Von Lehman
Latest version: 1.0.1

# 4front-logger

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]

![http://4front.io](https://s3-us-west-2.amazonaws.com/4front-media/4front-logo.png)

Default logger for the 4front multi-tenant web app platform. Learn more at: [4front.io](http://4front.io)

Internally [bunyan](https://www.npmjs.com/package/bunyan) is used for JSON logging. In accordance with [12 factor app practices](http://12factor.net/logs), by default errors and warnings are are streamed to `process.stderr` and info level messages are streamed to `process.stdout`. This behavior can be overridden via the options as described below. Recommended practice is to setup a log sink external to the node app which sends log events from all servers in a cluster to a centralized logging system such as [Splunk](www.splunk.com), [Loggly](https://www.loggly.com), or [Papertrail](https://papertrailapp.com).

## Installation
~~~
npm install 4front-logger
~~~

## Usage
~~~js
var app = express();
var log = require('4front-logger')({
  loggerName: "4front-logger"
});

// Register the logger with 4front
app.settings.logger = log;
~~~

### Options
__`loggerName`__
The name of the logger which will be added by 

__`errStream`__
The stream where error level messages are written. Defaults to `process.stderr`.

__`warnStream`__
The stream where warn level messages are written. Defaults to `process.stderr`.

__`infoStream`__
The stream where info level messages are written. Defaults to `process.stdout`.

__`ignoreErrorStatus`__
Array of http `err.status` codes to ignore. Defaults to `[404]`.

### API 
Any of the methods `error`, `warn`, or `info` can be called in all the ways that [bunyan supports](https://github.com/trentm/node-bunyan#log-method-api):

~~~js
log.info("informational message");
log.info({foo: 'bar'}, 'hi');
~~~

Additionally the `error` function includes a special overload that accepts an Error object and an Express `req` object. The logger will ensure that all the error detail along with additional contextual information found on the `req` are captured in the log entry. 4front uses this method in error handling middleware:

~~~js
app.use(function(err, req, res, next) {
	log.error(err, req);
	next();
});
~~~


## Running Tests
~~~
npm test
~~~

## License
Licensed under the Apache License, Version 2.0. See the top-level file LICENSE.txt and (http://www.apache.org/licenses/LICENSE-2.0).

[npm-image]: https://img.shields.io/npm/v/4front-logger.svg?style=flat
[npm-url]: https://npmjs.org/package/4front-logger
[travis-image]: https://img.shields.io/travis/4front/logger.svg?style=flat
[travis-url]: https://travis-ci.org/4front/logger
[coveralls-image]: https://img.shields.io/coveralls/4front/logger.svg?style=flat
[coveralls-url]: https://coveralls.io/r/4front/logger?branch=master
[downloads-image]: https://img.shields.io/npm/dm/4front-logger.svg?style=flat
[downloads-url]: https://npmjs.org/package/4front-logger