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

Simple way to serve a folder of static assets in the cloud, and update it or remove it all later #1459

Closed
wants to merge 5 commits into from

Conversation

boutell
Copy link
Member

@boutell boutell commented Jun 29, 2018

"Efficiently sync a local folder of static files to uploadfs,
with the ability to remove the folder and its contents later.
This ensures your application will still work if you move
it to s3, azure blob storage, etc. via uploadfs.

It is meant for delivering the output of tools like backstop,
sitemap generators, etc. that generate output as HTML files
and associated assets.

As long as you use this module, you won't have to worry about
making changes to those tools on the day you switch to S3."

apos.cloudStatic.syncFolder('/local-folder', '/uploadfs/folder') --> pushes it up, replacing folder’s contents efficiently if it exists
apos.cloudStatic.removeFolder('/uploadfs-folder') --> gets rid of one of these folders when you’re done with it
var url = apos.cloudStatic.getUrl('/uploadfs-folder')

I think I've limited the scope properly here, and keeping it inside Apostrophe reflects that this is a utility module for us that makes sense given what Apostrophe has on hand, not something more cosmic in scope.

@boutell boutell requested a review from agilbert June 29, 2018 15:37
@boutell
Copy link
Member Author

boutell commented Jun 29, 2018

Oops, fixing a couple things.

…l should be tested and should work, remove test brought back
@boutell
Copy link
Member Author

boutell commented Jun 29, 2018

OK, we're really ready now (:

@boutell
Copy link
Member Author

boutell commented Jun 29, 2018

We made this a standalone npm module instead.

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.

1 participant