Ask coding questions

← Back to all posts
Sync Json file to multiple Replies
EricSei2 (0)

I need to use the same Json file in 2 different Replits. is there a way to sync Json Files?

Comments
hotnewtop
theohalpern (27)

if you host your json as the website, another project could read from the website

EricSei2 (0)

@theohalpern On which website would i host it? i'm searching for an but i dont find an good website

theohalpern (27)

in the keep alive file replace
return "your bot is alive"
with
return send_from_directory("", "events.json")
you will also need to change the import statement to
from flask import Flask, send_from_directory
@EricSei2

Bunnytoes (113)

Sadly no, replit doesn't support that.

I might be wrong though, but don't count on it :'(

EricSei2 (0)

@Bunnytoes oh okay
do you know another way to make this? Something like a Database or something?

Bunnytoes (113)

@EricSei2 you can probally make 2
.json files
to do it

EricSei2 (0)

@Bunnytoes The problem with that is, that i update the content of the json file in the one Project, and i need to read the Content of the file in an other Project

Bunnytoes (113)

@EricSei2I don't know what to do then. Maybe copy and paste the 2nd one in? I don't know