0

Following through the tutorial and I couldn't get model creation to allow me to manually choose datasource. It automatically chooses "db (memory)"

Numerous datasources were created via "slc loopback:datasource"... datasource.json as follow:

{
  "db": {
    "name": "db",
    "connector": "memory"
  },
  "accountDB": {
    "name": "accountDB",
    "connector": "memory"
  },
  "anotherDB": {
    "name": "anotherDB",
    "connector": "mysql"
  },
  "yetAnotherDB": {
    "name": "yetAnotherDB",
    "connector": "mongodb"
  },
  "blah2DB": {
    "name": "blah2DB",
    "connector": "mysql"
  }
}

When creating model:

[?] Enter the model name: account

[?] Enter the model name: account

[?] Select the data-source to attach account to: db (memory)

[?] Expose account via the REST API? (Y/n)

Versions info:

node --version v0.10.31

slc --version
strongloop v2.9.1 (node v0.10.31)
├── strong-build@0.2.1
├─┬ strong-supervisor@1.0.1
│ └── strong-agent@0.4.14
├── node-inspector@0.7.4
├── strong-deploy@0.1.4
├── strong-pm@1.2.0
├── strong-registry@1.1.1
├── nodefly-register@0.3.3
└── generator-loopback@1.3.1
Tiny
  • 27,221
  • 105
  • 339
  • 599
huia
  • 1

1 Answers1

0

I was not able to reproduce this with virtually the same installation. What OS are you using?

Also, just to be sure, do you see the following prompt (what you pasted is slightly different):

[?] Select the data-source to attach account to: (Use arrow keys)
❯ db (memory) 

If/when you see that, can you please try hitting the down-arrow key: what happens?

Thanks, Rand

RandM
  • 231
  • 1
  • 3