Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Gina Trapani
    @ginatrapani
    Hello world!
    Paul Ford
    @ftrain
    Hello, Gina.
    Adam Pash
    @adampash
    😄🎉
    Roberio Moreira
    @RoberioMoreira4_twitter
    Hi Gina!
    Harshdeep Singh Hura
    @kinngh
    Hey
    Anyone had luck deploying mercury?
    On Firebase funcitons* ^
    harmavenso
    @harmavenso
    It would be nice to have instructions to run it on a non Amazon server too, or is that a too digital vegan thing to want?
    Adam Pash
    @adampash
    @kinngh I haven't tried it on a Firebase function, but it should work the same as anywhere else. Have you had trouble with that?
    @harmavenso What did you have in mind? Our API repo runs on serverless on AWS, but deploying to an AWS server would look a lot the same — you'd just need to have a working server and deploy pipeline https://github.com/postlight/mercury-parser-api/
    Harshdeep Singh Hura
    @kinngh
    @adampash I am stuck with things. I added the package as a dependency in packages.json , and because I lack the JS knowledge, I am stuck with actually building the index file
    harmavenso
    @harmavenso
    @adampash yeah, i found that out after posting my question. Thanks !
    Adam Pash
    @adampash
    @harmavenso great!
    @kinngh have you deployed anything with dependencies to a firebase functions before?
    Babak Fakhamzadeh
    @MastaBaba
    Pardon the ignorance. I don't grasp the distinction between the mercury parser and the mercury parser API. In my projects, I use CURL calls to something like https://mercury.postlight.com/parser?url=".$site["link"]. What do I need to do to keep this working after the Web Parser API is shut down?
    Babak Fakhamzadeh
    @MastaBaba
    @harmavenso I also would like to install on a non-Amazon server.
    Adam Pash
    @adampash
    @MastaBaba Mercury Parser is the library that powers the Mercury Parser API. You could run Mercury Parser in any JavaScript code directly without ever calling an API. In fact, if you're only using curl now, you could actually use the mercury-parser cli tool as described in the README here https://github.com/postlight/mercury-parser/#usage
    if, on the other hand, you'd still prefer to be able to call an API to get your parsed response, that's what the Mercury Parser API repo is for: https://github.com/postlight/mercury-parser-api/
    If you follow the instructions to deploy that to AWS, you can continue calling the API as you've been doing — just with a new base url.
    Babak Fakhamzadeh
    @MastaBaba
    Thanks @adampash. When I look at a command like "import Mercury from '@postlight/mercury-parser';", as mentioned in the README for the parser, I do not know where I am doing this import. If, for the API, the 'installation' as listed in that README is for deploying to AWS, I'm really lost; I'd think that the first step of deploying to AWS would be something like setting up some kind of environment on AWS, no?
    Haoji Xu
    @HaojiXu
    Hello everyone! Is there any way I can use Mercury parser in browser? I looked around and did not find any documentation about such usage but docs implied I can do this.
    Harshdeep Singh Hura
    @kinngh
    @adampash I don't have any experience running JS / firebase functions tbh
    Adam Pash
    @adampash

    @MastaBaba The import would happen in your javascript code. If you're not writing javascript/node, that's not something you'd need/want.

    Re the API: No, the only step to deploying to AWS using that repo is making sure your AWS credentials are set up as described in the README. Other than that, it uses the Serverless framework to provision and deploy your code to AWS. It doesn't run in a server — it runs on AWS Lambda, with API Gateway providing you with a URL to make requests.

    @HaojiXu Yes, you can run Mercury in the browser. Usage is the same, though one caveat is: If you're trying to parse URLs outside of your domain, you could run into CORS issues, depending on the policy of the site you're trying to parse.
    @kinngh I think your best bet, then, would be to look into deploying the Mercury Parser API https://github.com/postlight/mercury-parser-api/