Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] Add a new endpoint /sqldump, exporting the data for the current modules #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

spytheman
Copy link
Member

@spytheman spytheman commented Feb 5, 2020

This enables easier onboarding of contributors (they can test their
changes locally using real data).

[wip] It also adds a README with a short description about what you need to do to start working on the vpm codebase locally.

@spytheman spytheman changed the title Add a new endpoing /sqldump, exporting the data for the current modules. Add a new endpoint /sqldump, exporting the data for the current modules. Feb 5, 2020
@spytheman spytheman requested a review from thecodrr February 5, 2020 12:46
main.v Outdated
@@ -56,6 +57,11 @@ pub fn (app mut App) new() {
$vweb.html()
}

pub fn (app mut App) sqldump() {
sql := os.exec('pg_dump vpm --table=modules --no-password --username=admin') or { return }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As useful as this is, what if the user's db is not named vpm?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is already hardcoded in main.v . We can change it here and there to make it use env variables?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would be much better.

@spytheman spytheman requested a review from thecodrr February 5, 2020 15:59
@spytheman
Copy link
Member Author

On my PC, it now shows something like this:
endpoint

main.v Show resolved Hide resolved
@spytheman spytheman changed the title Add a new endpoint /sqldump, exporting the data for the current modules. [wip] Add a new endpoint /sqldump, exporting the data for the current modules Feb 5, 2020
@ArtemkaKun
Copy link
Contributor

@spytheman is this still valid or should be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants