9
15 Comments

What's the easiest way to host a simple JS API?

Do you know of any service with ZEIT.CO-like easiness of use, where I could just define a few endpoints (or deploy a simple express.js app), use a simple JSON document storage and deploy some code for the endpoints that would leverage the storage?

Like much much simpler Heroku etc. specifically for JSON API endpoints + simple built-in document storage.

posted to Icon for group Developers
Developers
on February 3, 2020
  1. 3

    Have you checked out Firebase? It's very easy to use and you don't even need to write api endpoints. It gives you a no-sql database with realtime features.

    1. 1

      Need to check that out. Last time I was working with Firebase, it was only a database. :)

  2. 2

    https://claudiajs.com/

    Simple tool that allows you to create and host an API on AWS Lambda. 1 million free invokes per month, serverless. It makes it easy to create endpoints, and you can add json files in a data folder in your project.

  3. 2

    Honestly I’d just put in a bit of time to learn how to run an express app on your own Linux server. It might take a bit more time to set up, but it’s a skill that will probably useful for longer than you’re developing software. I run my app on a few DigitalOcean droplets, but there are plenty of other VPS providers that are all basically the same.

    1. 3

      This is exactly what I do now after countless netlify, Firebase, and shared hosting sites.

      So much control over your projects from a low level with your own server. ☺️

    2. 1

      That's what I've been doing (15+ years full-stack web dev :D) but recently I've started transitioning to elegant builder-like services so I was wondering if something like a simple API builder with a document storage existed.

      I have a few use cases for public APIs which basically read data from a rather stable document structure (low change frequency), do some not very complicated data transformation and spit it out. The thing is I'd rather not run them on a machine which I have to sysadmin.

  4. 1

    For a simple project with Heroku like experience, see Dokku: https://github.com/dokku/dokku

  5. 1

    I have been using Next.js and hosting with ZEIT Now that you mentioned. Should be a breeze! In my example I used MongoDB Atlas free tier as well!

  6. 1

    Netlify Functions & MongoDB is probably what I would use in this case. Netlify also has an integration with FaunaDB, but I haven't used it yet.

  7. 1

    I have not used it but I thought this was exactly what zeit did.

    https://zeit.co/docs/v2/serverless-functions/introduction

    I'm very interested in this space myself, so I would love to know what it is about zeit that doesn't work for your use case.

  8. 1

    Hey man!
    I'm in a similar situation as you. I ended up going with a SQL solution in Google Cloud, just to get something started, but I'm starting to think it wasn't the best choice ...

    I've used Firebase in the past, and that works alright for what it is. Another thing you could consider is Mongo Atlas - MongoDBs cloud service (although it's not actually hosted with them, I believe they just handle all the boring config).

    Curious to see what you end up with.

  9. 1

    Firebase, Google App Engine, AWS Beanstalk, Render all have options that should fit your criteria.

    1. 2

      Thanks, I've worked with those, it's not quite what I am looking for :). But some Firebase or Render components might be close so I'll take a second look. It's been some time since I developed with Firebase and I see they've transformed it into a huge ecosystem.

  10. 2

    This comment was deleted 6 years ago.

    1. 1

      hey thanks for the mention :).

      @andy_f if you want to know more about StaticBackend I'll be happy to chat.

      Basically I was getting tired of building ~copy/paste backend for CRUD/query data, file storage and authentication, so I built a simple backend as a service.

      I think it's great paired with something like Netlify for hosting and function as a service.

      In any case, feel free to reach out.

Trending on Indie Hackers
6 weeks solo, 2 rejections, finally live but nobody told me marketing would be this hard User Avatar 87 comments Building ExpenseSpy solo, no funding — launching June 17 on iOS & Android User Avatar 39 comments Hi IH — quick update. The MVP is live. User Avatar 34 comments I built a $5/1k-listing CRE data API because CoStar is overkill for first-pass scans User Avatar 18 comments Day 7: 51 people answered my question. I wasn't ready for what they said. User Avatar 18 comments Building LinkCover – Day 3: Payment is live. No more building, time to sell. User Avatar 12 comments