paul-tqh-nguyen / arxiv_as_a_newspaper

arxiv.org portrayed as if it were a news paper.
0 stars 0 forks source link

Investigate Using Stitch as an endpoint #16

Closed paul-tqh-nguyen closed 5 years ago

paul-tqh-nguyen commented 5 years ago

This tutorial may be particularly helpful in this effort: https://www.youtube.com/watch?v=WBEzGFpAnhY

Most people are recommending using a MERN stack to access our back end.

If we can do it more easily via Stitch, I don't see why we don't just do that?

Let's investigate.

paul-tqh-nguyen commented 5 years ago

It looks like it's trivially doable with this snippet of code:

exports = function(payload, response) {
    const mongodb = context.services.get("mongodb-atlas");
    const db = mongodb.db("arxivRecentPapers");
    const collection = db.collection("recentPapers");
    const all_documents = collection.find({}).toArray();
    return  all_documents;
};
paul-tqh-nguyen commented 5 years ago

We've gotten that code up on our cluster.

Remaining Tasks:

paul-tqh-nguyen commented 5 years ago

We now have a wiki page for our implementation details wrt Stitch.

https://github.com/paul-tqh-nguyen/arxiv_as_a_newspaper/wiki/Notes-Regarding-Stitch

paul-tqh-nguyen commented 5 years ago

Progress Patch: https://github.com/paul-tqh-nguyen/arxiv_as_a_newspaper/commit/b23f0063b551a36a7ba26d6237f0b55bc31eb42f

This patch updates our README to accomplish the two previously stated goals WRT the README.