Questions tagged [nedb]

Embedded persistent database for Node.js, written in Javascript, with no dependency (except npm modules of course). You can think of it as a SQLite for Node.js projects, which can be used with a simple `require` statement. The API is a subset of MongoDB's. You can use it as a persistent or an in-memory only datastore.

About

NeDB is not intended to be a replacement of large-scale databases such as MongoDB! Its goal is to provide you with a clean and easy way to query data and persist it to disk, for web applications that do not need lots of concurrent connections, for example a continuous integration and deployment server and desktop applications built with Node Webkit or Electron.

Links

195 questions
0
votes
1 answer

Problem extracting data from NEDB database Node.JS

I have a NEDB Datastore called users which contains one line of information. I call a fetch request to retrieve the users from the server and I can tell that the request is being processed by debugging. However, the users.find() is not working and I…
0
votes
0 answers

NeDB ensureIndex isn't working as expected

I'm working on a twitter bot that is supposed to search the twitter api for key words in intervals and log the response in a database. I've so far logged results in a simple JSON but want to move to NeDB. I keep running into this error (shortened)…
0
votes
1 answer

insert into NedB boolean value without quotation marks

I have a NedB database which I'm trying to insert some new data into that I retrieve from HTML form, this is my function to insert new. addEntry(name,desc,ingred,allergy,cat,aval,price){ var entry = { Name: name, …
0
votes
0 answers

faile to send file with axios to nedb

hello when i try to send a picture from my client to my nedb server it make him crash i don't know what should i do, please help me when i tried to send directly the file without append it in data form a get an empty req.file i don't know what…
chihaz
  • 1
0
votes
1 answer

Use Discord.js/Node.js/NeDB to Remove Role From User After X Number of Hours

I'm relatively new to Javascript and Node, but I have managed to create a bot for my discord server and implement a basic economy, granting points based off of post submissions. These points are stored in an NeDB. I'd like to allow users to redeem…
0
votes
0 answers

Http POST request sending more than one request at the time

I am sending an HTTP POST request to insert specific username/password data on a database and for some reason, it works but it sends and registers twice or more times. The HTTP request (instead of one, two): My code from the javascript file (Client…
0
votes
3 answers

Keep getting a DELETE 400 (Bad Request) with my REST API

So, I've created a API and I've got my POST and GET requests working, but I'm can't get the DELETE request to work. I keep getting a 'DELETE http://localhost:3000/api 400 (Bad Request)' error in the console. Here is the delete section in my server…
firecode85
  • 49
  • 1
  • 5
0
votes
1 answer

How do I store NeDB objects in a collection?

I want to use NeDB as a database for a very simple ExpressJS application. I would like to store collections of objects into a separate file, so one file for orders (orders.json). However, whenever I insert an order object into the datastore, it is…
AbdelHajou
  • 23
  • 1
  • 5
0
votes
1 answer

NEDB & Nodejs: searching for specific record in home.db using user input - unable to pass parameter to index.js

STUDENT WARNING. I am learning to use Nodejs, express with NEDB and database. I am attempting to query my home.db (NeDB) for a specific record, making use of user input (in this case, the name of a person). High-level diagram of the…
0
votes
1 answer

How to store only certain fields from NeDB database into an array with NodeJS

I have an embedded NeDB database with numerous entries with multiple fields and I'm looking to only get the dates from every entry and store it into an array. I'm using NeDB, NodeJS and express. The dataset looks like so: {"goalName":"swim…
giants22
  • 75
  • 7
0
votes
1 answer

nodejs - save account information inside .env file or in client side database

I've created a simple nodejs app that will use express to do some file processing operations. I will pack the final app using pkg this mean that the app will access the packaged resources in readonly mode. Since I want to implement a login system…
newbiedev
  • 2,607
  • 3
  • 17
  • 65
0
votes
0 answers

Why do I get nedb error "You cannot mix modifiers and normal fields" on update

I try to update an nedb document using basically the following code: var doc = { "$set": { "freimessen.messungen": [ { "Intervall": "kein", "messvorlage": 9, …
elsni
  • 1,953
  • 2
  • 17
  • 35
0
votes
1 answer

NeDB not calling back when using findOne()

I am creating an OAuth 2.0 service for my up-and-coming Alexa skill, and when I'm getting a client from the clients database using NeDB, there's no callback. getClient() module.exports.getClient = async (clientId, clientSecret) => { let params =…
IceBotYT
  • 74
  • 1
  • 14
0
votes
1 answer

How do I find documents by name only with NeDB?

I'm trying to find documents by only the document name in NeDB. I have read through the documentation, but all examples also search on a value. I am only inserting one document, and need to query by its name only. const Datastore =…
Dshiz
  • 3,099
  • 3
  • 26
  • 53
0
votes
1 answer

Tring to get nedb to import in a Svelte component

I have a basic Electron/Svelte app and I'm trying to add database functionality using nedb. If I use let Datastore = require("nedb") I get an error, "Uncaught ReferenceError: require is not defined". The best advice I could find was to use import…
Kim Aldis
  • 583
  • 1
  • 4
  • 15