trailsjs / trailpack-core Goto Github PK
View Code? Open in Web Editor NEW:package: Core Trailpack
License: MIT License
:package: Core Trailpack
License: MIT License
TypeError: Cannot read property 'logger' of undefined
Seems to be introduced in alpha-4
When Trails start it show some informations about ORM and web server but it doesn't show witch web server is used. hapi
express4
.... It can be nice to have it too.
Is there a way to override the motd.js
config ? I try to duplicate motd.js
under config
and change the informations but it's not working. It can be useful to add informations for big projects.
When the temp
folder is not given by the user, it was added by this repo. But it was create after config.main.paths
values. https://github.com/trailsjs/trailpack-core/blob/master/index.js#L47
That's mean if I have :
paths: {
root: process.cwd(),
www: path.resolve(process.cwd(), '.tmp', 'public')
}
This will crash because core
try to first create www
path and then temp
path so a Error: ENOENT: no such file or directory, mkdir '/.tmp/public'
But if now I change and set this :
paths: {
root: process.cwd(),
temp: path.resolve(process.cwd(), '.tmp'),
www: path.resolve(process.cwd(), '.tmp', 'public')
}
All is working because temp
is create before www
.
My opinion is if temp
, socket
and log
are added by core
so they have to be create first.
When I use [email protected]
trailpack not working like in this issue trailsjs/trailpack#12
When loading controllers, services etc., the classes are instantiated, but then the instance will receive its own set of functions defined on the prototype which are bound to that particular instance. This is done here.
Is this really necessary?
I think I understand the intention here (avoid issues when those functions are called without context), but I would like to challenge the decision to support this kind of practice. To me, if someone tries to grab a method from a class instance, call it without its context (this
) and expect it to just work, they are doing it wrong.
If my understanding is correct, the decision to use classes for controllers, models, services etc. has been quite recent so this might just be a remnant of some now-obsolete practice.
I would really love to get rid of this. :) Will you accept A PR that removes such functionality and instead just creates a new instances of all the things?
With the winston logger, do we want to distinguish different colors for the output of the logs? For instance, winston does this with the info and error but not the actual message. You can use a npm module called colors to make all the errors red, etc.
I try to add orm : 'waterline'
on config/database
but joi validation tell me I'm not allowed to do this. Also trying to do it under trailpack-waterline
configuration method but same error. So Trails keep telling there no orm installed
Fix Travis CI and redeploy. Reported by @jaumard in gitter
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.1.2
npm ERR! npm v2.14.4
npm ERR! shasum check failed for /var/folders/w8/79t7n_v96kx42lrn_7sm8k2c0000gn/T/npm-41406-f84a1299/registry.npmjs.org/trailpack-core/-/trailpack-core-0.0.10.tgz
npm ERR! Expected: 938f709b62dfda5ba0b5d8c59cb4e0b312031035
npm ERR! Actual: 44001adec109dd6b828e0144e40389ca64caba10
npm ERR! From: https://registry.npmjs.org/trailpack-core/-/trailpack-core-0.0.10.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/jaumard/Downloads/trailsTest/npm-debug.log
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.