How do I reference a local file when moving to a remote server

I’m trying to deploy my dash app on EBS. I currently reference a local directory (on my machine) as ‘C:\users\me\projects\superstar\assets\database.db’
My dash is in the superstar folder. I’ve tried changing this to ‘/assets/database.db’, but the code is unable to find the file.

Any thoughts would be much appreciated?



Try using os.getcwd() and os.path.join() if you are using python.

I hope that helps.

Thanks. I solved it. the problem was the file was in a folder in the project directory ie:
‘\Project\Dash\’ and the database was in \Project\Dash\Assets\name.db. to access the .db file I had to use ‘/Dash/Assets/name.db’ which was confusing for me given the location of the app file.