RailwayJS and Mongoose with option --coffee

275 Views Asked by At

does somebody know why data will not be stored in mongodb in a railway-project using the --coffee option?

Creating a project the regular way (w/o --coffee option) data will be saved in mongodb. So when do the following:

railway init blog && cd blog

and after modifying the database.json to

{ "development":
  { "driver":   "mongoose"
  , "host":     "localhost"
  , "database": "blog_dev"
  }
}

everything works fine when I install all dependencies and start the server with

npm install -l
railway g scaffold post title content
railway s

So far. But when I create a project with --coffee option like:

railway init blog --coffee

and after modifying the database.yml (this is different in coffe-mode) to

development:
  driver:   "mongoose"
  host:     "localhost"
  database: "blog_dev"

and after installing all dependencies and start the server with

npm install -l
railway g scaffold post title content --coffee
railway s

data will only stored in memory.

any idea?

1

There are 1 best solutions below

0
On BEST ANSWER

Use database.json instead of database.yml:

{
  "development": {
    "driver": "mongoose",
    "host": "localhost",
    "database": "blahblahblah"
  },
  "test": {
    "driver": "memory"
  }
}