# Can I send data to a Node+Express backend without a true Database?

**URL:** <https://forum.kirupa.com/t/can-i-send-data-to-a-node-express-backend-without-a-true-database/661742>\
**Category:** web dev\
**Created:** [September 20, 2023, 10:00pm UTC](https://forum.kirupa.com/t/can-i-send-data-to-a-node-express-backend-without-a-true-database/661742 "2023-09-20T22:00:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdub1312](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kdub1312/32/23536_2.png) [@kdub1312](https://forum.kirupa.com/u/kdub1312)\
**Post date:** [September 20, 2023, 10:00pm UTC](https://forum.kirupa.com/t/can-i-send-data-to-a-node-express-backend-without-a-true-database/661742/1 "2023-09-20T22:00:13Z")

</div>

Hello,

I am building a small bedtime checklist app (to encourage my kids to just please, get ready for bed 😄 ) and I’ve reached a point that I need to send data to the backend so my Express script can determine where to send the user next

Is this possible without implementing a true database? Currently I’m using IndexedDB on the browser to save the state of some checklist items. However, I’m wondering if I can take that data, post it via an express route, act on it on the server side, and based on the data, serve up the appropriate view.

I see in the docs there is a req.body object, but so far I have been unable to assign additional data to is. Is that possible? If not, is there another way I can send data with the post?

```auto
router.post("/bedtime-checklist", function (req, res, next) => {
  // can I access a variable from a frontend script here?

  //based on the above variable, add conditional here to send 
 // to complete page or incomplete page
  res.redirect("/bedtime-checklist-complete");
});

```

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [September 21, 2023, 3:00am UTC](https://forum.kirupa.com/t/can-i-send-data-to-a-node-express-backend-without-a-true-database/661742/2 "2023-09-21T03:00:32Z")

</div>

Unfortunately, this goes a bit beyond my familiarity with backend databases. One thing you could do is store the data in a cloud/serverless database like Firestore or AWS Lambda. Those may be extremely easy ways to get a checklist up and running with minimal effort.

---

<div class="post-metadata">

**Author:** ![PAEz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/paez/32/19607_2.png) [@PAEz](https://forum.kirupa.com/u/PAEz)\
**Post date:** [September 21, 2023, 4:33am UTC](https://forum.kirupa.com/t/can-i-send-data-to-a-node-express-backend-without-a-true-database/661742/3 "2023-09-21T04:33:08Z")

</div>

As always, I dont do react or server stuff, but…

I think you want to be looking at routing with parameters and handling post data in express.  
**Routing with parameters.**  
[Route Parameters in Express - Mastering JS](https://masteringjs.io/tutorials/express/route-parameters)  
Send the bit of data that the server needs to react to with this. Good for small amounts of data.  
**Handling POST data…**  
[Handling any POST data in Express](https://codex.so/handling-any-post-data-in-express)  
Great for sending over larger amounts of data, anything jsonable.

But really if your not storing the checklist on the server then this could prolly just be a single page app. Once loaded from the server it shouldnt need it again and in the very least all decisions could be made on the client.

---

<div class="post-metadata">

**Author:** ![steve.mills](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/steve.mills/32/14961_2.png) [@steve.mills](https://forum.kirupa.com/u/steve.mills)\
**Post date:** [September 21, 2023, 10:34am UTC](https://forum.kirupa.com/t/can-i-send-data-to-a-node-express-backend-without-a-true-database/661742/4 "2023-09-21T10:34:55Z")

</div>

Hey Kevin,

If you are using IndexedDB and you have a web app you are probably using a Service Worker?..

You could always route a response (view) through a Service Worker based off the headers or route in your fetch/ post request without using Node/ Express at all…

---

<div class="post-metadata">

**Author:** ![kdub1312](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kdub1312/32/23536_2.png) [@kdub1312](https://forum.kirupa.com/u/kdub1312)\
**Post date:** [September 21, 2023, 1:16pm UTC](https://forum.kirupa.com/t/can-i-send-data-to-a-node-express-backend-without-a-true-database/661742/5 "2023-09-21T13:16:14Z")

</div>

> [@PAEz](#):
>
> Route Parameters in Express - Mastering JS

@steve.mills I am using IndexedDB but not a service worker…yet. I don’t have any experience with service workers put perhaps this is my chance to try that out- thanks for the recommendation!

---

<div class="post-metadata">

**Author:** ![kdub1312](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kdub1312/32/23536_2.png) [@kdub1312](https://forum.kirupa.com/u/kdub1312)\
**Post date:** [September 21, 2023, 1:17pm UTC](https://forum.kirupa.com/t/can-i-send-data-to-a-node-express-backend-without-a-true-database/661742/6 "2023-09-21T13:17:37Z")

</div>

I had not thought of using parameters, I’m going to look into that. ‘Good for small amounts of data’- this describes my app, so it could turn out to be a good fit. Thanks!
