$ cd server
$ node server.js
$ cd ../collector
$ node index.js
info: Acre, 2 cidades, 74 postos: Cruzeiro do Sul, Rio Branco
400 400
(node:91388) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Started the api on port 8080
Mongoose: weeks.ensureIndex({ _id: 1 }, { unique: true, background: true })
Mongoose: states.ensureIndex({ _id: 1 }, { unique: true, background: true })
Mongoose: stations.ensureIndex({ name: 1 }, { background: true })
Mongoose: anpdatas.ensureIndex({ week: 1 }, { background: true })
info: mongo uri: mongodb://localhost:27017/anp-price-collector
Mongoose: stations.ensureIndex({ flag: 1 }, { background: true })
Mongoose: anpdatas.ensureIndex({ state: 1 }, { background: true })
Mongoose: weeks.ensureIndex({ from: 1 }, { background: true })
Mongoose: states.ensureIndex({ name: 1 }, { background: true })
Mongoose: stations.ensureIndex({ state: 1 }, { background: true })
Mongoose: anpdatas.ensureIndex({ 'cities._codCity': 1 }, { background: true })
Mongoose: weeks.ensureIndex({ to: 1 }, { background: true })
Mongoose: states.ensureIndex({ 'cities._codCity': 1 }, { unique: true, background: true })
Mongoose: stations.ensureIndex({ city: 1 }, { background: true })
Mongoose: anpdatas.ensureIndex({ 'cities.name': 1 }, { background: true })
Mongoose: weeks.ensureIndex({ from: 1, to: 1 }, { unique: true, background: true })
Mongoose: states.ensureIndex({ 'cities.name': 1 }, { background: true })
Mongoose: stations.ensureIndex({ name: 1, address: 1, area: 1, flag: 1 }, { unique: true, background: true })
Mongoose: anpdatas.ensureIndex({ 'statistics._codType': 1 }, { background: true })
Mongoose: anpdatas.ensureIndex({ 'statistics.type': 1 }, { background: true })
Mongoose: anpdatas.ensureIndex({ 'stations.name': 1 }, { background: true })
Mongoose: anpdatas.ensureIndex({ 'stations.flag': 1 }, { background: true })
Mongoose: anpdatas.ensureIndex({ 'prices._codType': 1 }, { background: true })
Mongoose: anpdatas.ensureIndex({ 'prices.type': 1 }, { background: true })
Mongoose: anpdatas.ensureIndex({ week: 1, state: 1 }, { unique: true, background: true })
Debug: validation, error, payload
Error: child "state" fails because [child "cities" fails because ["cities" at position 0 fails because [child "stations" fails because ["stations" at position 10 fails because [child "prices" fails because ["prices" at position 0 fails because [child "date" fails because ["date" must be a number of milliseconds or valid date string]]]]]]]]
at postValidate (/Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/lib/validation.js:72:26)
at internals.Object.internals.Any._validateWithOptions (/Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/node_modules/joi/lib/any.js:653:16)
at module.exports.internals.Any.root.validate (/Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/node_modules/joi/lib/index.js:100:23)
at Object.internals.input (/Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/lib/validation.js:129:20)
at exports.payload (/Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/lib/validation.js:27:22)
at /Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/lib/request.js:389:16
at iterate (/Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/node_modules/items/lib/index.js:35:13)
at done (/Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/node_modules/items/lib/index.js:27:25)
at internals.Auth.payload (/Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/lib/auth.js:357:16)
at /Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/lib/request.js:389:16
at iterate (/Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/node_modules/items/lib/index.js:35:13)
at done (/Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/node_modules/items/lib/index.js:27:25)
at onParsed (/Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/lib/route.js:438:20)
at /Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/lib/route.js:459:20
at next (/Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/node_modules/subtext/lib/index.js:45:16)
at /Users/rodrigorecio/Downloads/anp-price-collector-master/server/node_modules/hapi/node_modules/subtext/lib/index.js:168:20