Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Suggestion: Allow http (and non :433) URLs for testing purposes #135

@samlaycock

Description

@samlaycock

Basically this:

import { connect } from '@planetscale/database'

const config = {
  url: 'http://user:password@localhost:3000'
}

const conn = connect(config)

Because....

We're using a home-grown Docker image to allow us to build with @planetscale/database while in offline situations (like the 14 hour flight I was just on)- it's a dumb express server that emulates, as far as we can tell, the current API this package uses. Obviously understanding the API isn't documented, is not really intended for this and is subject to change etc, it would still be good if this package didn't assume the connection URL is an https one when using the config.url value with a valid http/https string.

I've got a fork that implements it (and adds a test), but wanted to float the idea before submitting a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions