title: javascript SQLITE_BUSY: database is locked, sql: insert into "users"
body: <p>I am working on a 'sign up' page and having trouble with sqlite.</p>
  
  <p>I am using express, bcrypt-nodejs, bookself.js for sqlite. getting an error saying database is lock. any workaround for this? appreciated. below is the code for the part.</p>
  
  <pre><code>app.post('/signup', function(req, res){
    var username = req.body.username;
    var password = req.body.password;
    bcrypt.hash(password, null, null, function(err, hash){
      new User({'username': username, 'password': hash})
        .save()
        .then(function(){
          console.log('Successfully added a user');
        })
        .catch(function(err){
          throw err;
        });
    });
    res.render('login');
  });
  </code></pre>