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

How to setup a multi database environment? #410

Closed
aborruso opened this issue Feb 10, 2019 · 1 comment
Closed

How to setup a multi database environment? #410

aborruso opened this issue Feb 10, 2019 · 1 comment

Comments

@aborruso
Copy link

Hi,
first of all I need to write that Simon Willison and datasette are really great.

I have probably a stupid question, but it seems to me that I do not have the reply in the documentation.

I have installed datasette and run it with datasette mydb.db, and I can reach it on http://127.0.0.1:8001.

But how to work with more than one db? Imagine I have ten sqlite databases, and that I need to explore/query these via datasette, how to run datasette? Is it possibile to create a sort of db index and than run datasette serve myindex?

Thank you

@simonw
Copy link
Owner

simonw commented Apr 12, 2019

You can pass multiple databases as command-line arguments, and each one will be loaded. For example:

datasette mydb.db otherdb.db

Then the URLs should be:

http://127.0.0.1:8001/mydb for the first one
http://127.0.0.1:8001/otherdb for the second one

@simonw simonw closed this as completed Apr 12, 2019
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

No branches or pull requests

2 participants