Closed luisincrespo closed 9 years ago
What's the structure of the project, what's in the fixtures
folder?
I have an api for Group, pretty simple. It has its model Group.js and its controller GroupController.js.
Inside the fixtures I have a Group.json, with the following content:
[
{
"name": "Test"
}
]
My development database adapter uses a local mongodb, with sails-mongo.
Before running
node seedDevelopment.js
I lifted the local server as
sails lift
Try to pass an absolute path to the Barrels
constructor, or build one using process.cwd()
, looks like ./...
points to a module folder or something.
I'm no longer trying to use Barrels. Went with the "manual" way and seeding the DB on sails bootstrap.js. Thanks anyways for your help bro.
Hi. I'm trying to use barrels to seed my db.
I have my JSON files inside _/fixtures/_.
I created a _/seedDevelopment.js_ file with the following content:
When I run
I get the following error:
What am I doing wrong?.