npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

flyway-rest

v0.0.4

Published

REST interface for flyway.

Downloads

5

Readme

flyway-restBuild Status npm version Dependency Status

REST interface for flyway.

Install

Run docker container

docker run

Run the development environment:

$ git clone https://github.com/stefanwalther/flyway-rest && cd flyway-rest

$ docker-comose up --f=./docker/docker-compose.dev.yml up

Usage

End Points

All endpoints share the same parameters. All endpoints are also described in an OpenAPI definition file (swagger), which can be accessed at http://:/api-docs/

Parameters

Post parameters

  • mode - The execution mode. The following values are possible:
    • get-cmd - Does not execute the command, just validates and processes the request and returns the generated command (see cmd in the result).
    • sync - Executes the command synchronously and returns the result
  • flyway_args - Flyway arguments as used in "Flyway Command-line"
  • files -

Result

  • status - Status of the operation. Can have the following values:
    • OK - Everything OK.
    • Error - An error occurred, see error for more details.
    • ValidationError - A validation error occurred, see validationErrors for more details.
  • mode - The execution mode as passed in.
  • cmd - The CLI command as generated, based on the input arguments.
  • errorMsg - Error message in case of status equals Error or ValidationError.
  • validationErrors - Array of validation errors.

Examples

The examples use superagent, so install that first:

$ npm install superagent --save

Clean

import superagent from 'superagent'

const url = '';
let args = {
  
};

superagent( url )
  .post( '/clean` )
  .send( 'args' )
  ;
  

Migrate

import superagent from 'superagent';
import fs from 'fs';

// Create a list of file definitions

const url = '';
let args = {
  mode: 'sync',
  flyway_args: {
    url: 'jdbc:postgresql://server-name:5432/your-db',
    user: 'postgres',
    password: 'postgres'
  },
  files: fileDefs
};

superagent( url )
  .post( '/migrate' )
  .send( args )
  .end( ( err, res ) => {
    if (err) console.error( err );
    
    // DB has been migrated    
    console.log( 'Migration result: ', res.body );
    
  });

## Todos

- [ ] Clear separation of concerns:
  - [ ] container flyway-rest-integration should not execute unit tests
- [ ] Container optimization
  - [ ] No need to do the full install on flyway-rest-integration; could use only a subset of devDependencies
- [ ] nodemon should not be part of the official image

## Author

**Stefan Walther**

* [github/stefanwalther](https://github.com/stefanwalther)
* [twitter/waltherstefan](http://twitter.com/waltherstefan)

## License

Released under the MIT license.

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on November 30, 2016._