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
3
votes
1 answer

nedb post data appears only after restart

So basically I wrote a simple API where you can perform http POST and http GET on a nedb. My problem however is, that after posting an entry (customer), the entry appears in the nedb file but when I use the GET method it isn't returned. However…
3
votes
1 answer

Accessing NeDB find() results

I'm making an app with Angular 2 and Electron and using NeDB as a data storage. The search service is intended to handle operations with DB, for now I want it to load whole database and return it. search.service.ts import { Injectable } from…
Ivan Bespalov
  • 147
  • 1
  • 12
3
votes
1 answer

removing data from NeDB database

this is my order to delete a data from my db chats.remove({ _id: chatId }, {}, function (err, numRemoved) // chatId = 1001131507377 the database before running the remove order {"_id":1001131507377,"chatTitle":"test group","AddedBy":"159263523 -…
Engineer Passion
  • 1,051
  • 1
  • 8
  • 14
3
votes
3 answers

Force NeDB to create local file with Electron

I am using NeDB in my Electron Application with React.js to store some tasks and projects persistently. I am initializing two DataStores in a file called Database.js. this.taskCollection = new Datastore({ filename:'./tasks.json', …
grahan
  • 2,148
  • 5
  • 29
  • 43
3
votes
2 answers

Angular 2: How do I use nedb with a web only application?

Right now in my index.html, I need to do This loads the persistent nedb database "someFile2"…
coder
  • 353
  • 5
  • 18
3
votes
2 answers

NEDB persistance in Electron app

I am trying to connect to nedb from electron app. CRUD operations work great. BUT I don't see db file (D:/my.db, checked for hidden files). File exists somewhere, because it keeps data even after machine reboot. I suspect that electron threats my…
Uriil
  • 11,948
  • 11
  • 47
  • 68
3
votes
1 answer

how do use `NeDB` in-browser for persistence between sessions?

The documentation says If you specify a filename, the database will be persistent, and automatically select the best storage method available (IndexedDB, WebSQL or localStorage) depending on the browser. The very short example shows only…
punkish
  • 13,598
  • 26
  • 66
  • 101
3
votes
2 answers

How to build models (ODM) in nodejs to use with nedb

I am looking for a ODM module that can be used with Nedb in NodeJs-Express. Is it somehow possible to use Mongoose or Waterline schemas in combination with nedb for validation? Mongoose and Waterline do not provide an official adapter for nedb. At…
Interfaced
  • 124
  • 3
  • 10
3
votes
2 answers

Correct way to pass data from nodejs to angular in nwjs (node-webkit)

Solved: The below code now works for anyone who needs it. Create an Angular factory that queries a database and returns query results. Pass those results of the query into the $scope of my controller Render the results of the $scope variable in my…
user2263572
  • 5,435
  • 5
  • 35
  • 57
3
votes
0 answers

Express.js database and validation logic. Where?

Nothing important My first question here on stackoverflow. I've used it for years to find answers, but now I need a bit of guidance. I'm new to node and express and the async way of structuring an app. Goal - A REST interface with validation and…
Simon Says
  • 31
  • 1
3
votes
1 answer

I am getting a 401 Unauthorized from Node.js, Restify and Passport

I am getting a 401 even though all my console logs are printing... Here is my server code: var Datastore = require('nedb'); var db = new Datastore({ filename : 'datafile.db', autoload : true }); var restify =…
Ray Hulha
  • 10,701
  • 5
  • 53
  • 53
3
votes
1 answer

Is CRUD API of NeDB compatibale with MongoDB?

I am looking for MongoDB API compatible DB engine that does not require a full blown mongod process to run (kind of SQLite for Node). From multiple candidates that persistently store data on a local disk with similar API ended up with two: NeDB…
Yauhen Yakimovich
  • 13,635
  • 8
  • 60
  • 67
3
votes
1 answer

Updating an array element in nedb

I know this has been answered before, but for some reason none of the solutions has helped me. So I'd like to ask for some help and see if you can spot what I'm doing wrong. I have nedb running and a .db file that looks something like this (removed…
Dan
  • 183
  • 1
  • 8
2
votes
1 answer

why my fetch post is not working it is not responding?

addwordform.addEventListener('submit', (event)=>{ event.preventDefault(); const formdata=new FormData(addwordform); const word=formdata.get('addword'); const description =formdata.get('addiscription'); const worddata={ …
Advaith s
  • 21
  • 4
2
votes
0 answers

How to fix 'Can't insert key undefined, it violates the unique constraint' error in NeDB?

I'm trying to use NeDB for my vue.js app, but the following error occurred when I tried to save my data from the second time. The Error is: "Can't insert key undefined, it violates the unique constraint." I'm making the app in electron-vue. I…
user4565857
  • 155
  • 1
  • 2
  • 9
1
2
3
12 13