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

Issue #43 : Feature rest api http download project #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tlgman
Copy link

@tlgman tlgman commented Jun 16, 2019

Issue #43
Add api to download project from GET url.
Example :
GET http://localhost:8000/api/webpack/?main-library=react&transpiler=babel&utilities=lodash,moment&image=svg,png&optimization=react-hot-loader

I don't know if it's right way to do that with Gatsby, i'm waiting for your feedback 😄

I want create some backend tests but i don't know if you're ok to install another module to do that.

@tlgman tlgman changed the title Issue 12 : Feature rest api http download project Issue #43 : Feature rest api http download project Jun 16, 2019
@jakoblind
Copy link
Owner

Nice work! I think we have to move this code of Gatsby. Because in production Gatsby just generate static pages. That means only html/css/js. No servers. That means we can't have a REST endpoint there. The best option I see is to create a AWS lambda function. To prepare for that we need to isolate this code to one single file with one single function, and then I can do the job of converting it to the lambda, setting it up, pointing DNS, etc.

Test would be nice! Maybe unit tests? I have jest set up already. This is an example: https://github.com/jakoblind/webpack-autoconf/blob/master/src/configurator/project-generator.test.js

@tlgman tlgman force-pushed the feat-api-http-download-project branch from f6ca58d to de164db Compare June 18, 2019 23:03
@tlgman
Copy link
Author

tlgman commented Jun 18, 2019

Ok, thanks for your feedback. I don't know really how lambda aws are working.
I completly rewrite my code, for the moment It's a draft, but i've the error 'Missing credentials in config'.
You should maybe try with YOUR_KEY and YOUR_SECRET_KEY.
I'm a little stuck for the moment 🤒

@jakoblind
Copy link
Owner

nice! will have a look at it and try it out. I'm going offline for 2 weeks, but will have a loook when I come back 👍

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.

2 participants