SaaS integration example using ExpressJS API endpoints and Firebase
In this example let us build a micro-SaaS that calls an API we create on a standalone ExpressJS server. The user dashboard web page posts and fetches data from the API with authenticated requests via JWT.
You need:
All of the above services have useful free tiers, and picked as the easiest ways to get started.
Follow our deploy setup guide to set up frontend deploys. Deploy as needed by making changes in the source files through the github web editor.
Fork https://github.com/saasbox-templates/expressjs-api-backend repository into your github account.
- 1.
- 2.In the left pane choose "All Products". In the listed options, find "Cloud Firestore" and click on it. In the next page, click on "Create a Database".
- 3.Select project overview, and gear icon in the top left. Then select "Project Settings"
- 4.Select "Service Accounts" tab
- 5.Click on "Generate new private key" and download the key file.

Make sure you see the "Firestore Database" listed on the left pane and click on it to view it. Your database should now be visible, and entries editable through this web interface.
- 1.Create the web service:Create a render "web service" and connect render to your github account and the repository you just forked. This connection will auto-deploy the repository to render.
- 2.Set up the web service Settings as follows:
- 1.Build command: npm install
- 2.Start command: node ./bin/www
- 3.Repository field should show the url for the github repository you just forked (copied).
- 3.Set up Render Environment Variables