0

I followed the steps on https://gist.github.com/jchris/3c32524577deff3d69aa I also posted my details step on the comment of the above link

but I can not use "http://lite.couchbase./mydb/" to connect the local couchbase lite in react native

any tips will be greatly appreciated!

user1521398
  • 523
  • 1
  • 4
  • 7

1 Answers1

0

solved: use the below method:

- (void)launchCouchbaseLite
{
  NSLog(@"Launching Couchbase Lite...");
  CBLManager* dbmgr = [CBLManager sharedInstance];
  CBLRegisterJSViewCompiler();

  CBLListener* listener = [[CBLListener alloc] initWithManager:dbmgr         port:5800];
  [listener start:nil];

  NSLog(@"Couchbase Lite url = %@, and port %d", dbmgr.internalURL, listener.port);
}

then use "http://127.0.0.1:5800/yourDBName" as REST URL instead of "http://lite.couchbase./yourDBName"

user1521398
  • 523
  • 1
  • 4
  • 7