Questions tagged [flatiron.js]

Flatiron is an adaptable framework for building modern web applications. It was built from the ground up for use with Javascript and Node.js

What's included?

URL Routing A simple tool for directing traffic based on URLs that are received both on the browser and server.

Templating An unobtrusive templating tool that is fast, DSL free and simple to use.

Data Management A storage agnostic resource-oriented object to document mapper for building data models with validation and sanitization.

Middleware A Modern hybrid buffered/streaming middleware kernel backwards compatible with connect.

Plugins A plugin manager that provides lightweight application extensibility and composition with a twist of feature reflection.

Logging A multi-transport async logging library for node.js with plugins for many commonly targeted stores.

46 questions
48
votes
6 answers

Winston: how to rotate logs

How can I rotate logs when using Winston to handle logging for node.js. That is, how can I create a new file for each day the app runs? var logger = new (winston.Logger)({ transports: [ new (winston.transports.Console)(), …
Sparky1
  • 3,335
  • 6
  • 26
  • 29
42
votes
7 answers

Node.js: Winston: Can I add default meta data to all log messages

I'm using Winston in Node.js for logging. I know I can add metadata individually to each log message but is there a way to specify a default set of metadata that'll be added to every log message (such as the app name) as I don't want to specify it…
Sean Bannister
  • 3,105
  • 4
  • 31
  • 43
21
votes
5 answers

Multiple log files with Winston?

We'd like to use Winston for our logging in Node.js. But, we can't figure out how to have two log files: one for just errors, and one for everything else. Doing this the naive way doesn't work, however: adding multiple winston.transports.File…
Domenic
  • 110,262
  • 41
  • 219
  • 271
18
votes
3 answers

Node.js Express vs. Flatiron

Akin to this question, "I'm looking for the pros and cons of each framework and why one is particularly useful over the other" (but mostly what Flatiron has to offer, due to the fact that Express is already detailed pretty well in that…
chrisdotcode
  • 1,569
  • 2
  • 17
  • 22
14
votes
1 answer

Can I dump the current nconf configuration to an object?

Is there any method in nconf to collect all the keys from all the stores into a single object? Imagine I've got this little script: assert = require('assert'); nconf = require('nconf'); nconf.argv().env().defaults({'C':…
hurrymaplelad
  • 26,645
  • 10
  • 56
  • 76
11
votes
1 answer

flatiron.js/plates partial templates?

So, I just started working with flatironjs and "plates". I'm trying to figure out how I can have a main layout template and then a partial template that loads content into the main layout template similar to how expressjs does it... With expressjs…
xspydr
  • 3,030
  • 3
  • 31
  • 49
7
votes
1 answer

flatiron.js / plates - How to work with templates and i18n?

I just started looking at plates, as many people are talking about it. There are some examples for plates with little html snippets, but not really a full-blown template file. So I am wondering how I can separate especially the layout into a…
Patrick
  • 7,903
  • 11
  • 52
  • 87
7
votes
2 answers

flatiron.js routing and templating with union, director and plates?

Coming from express.js, I want to give flatiron a try for a small project. However, there are some small problems which keep me from actually getting somewhere. var flatiron = require('flatiron') , session = require('connect').session , ecstatic =…
Patrick
  • 7,903
  • 11
  • 52
  • 87
6
votes
3 answers

Is there a module to easily mock req/res objects for unit testing a connect style handler?

I'm writing an app in node.js that includes some connect style endpoint handlers ( function(req,resp) ) and would like to write some unit tests against them without requiring the full app to be running. I know I can "simply" push whatever fixture I…
Miguel Coquet
  • 300
  • 2
  • 10
5
votes
1 answer

Authentication and authorization with Flatiron's Resourceful & Restful

I want to implement authentication and authorization in the Flatiron stack (using Flatiron, Resourceful and Restful). I want to require that a user has the necessary permissions, when trying to change a resource. In the Restful Readme file, there's…
pvorb
  • 7,157
  • 7
  • 47
  • 74
5
votes
2 answers

How can I use director as router in expressjs

I want to use express.js with Flatiron's director (router) and Resourceful (ODM) because I need like the benefits of routing tables and clean multi-db schemas with validation. The reason why I now completly switch to Flatiron is, is because I think…
dev.pus
  • 7,919
  • 13
  • 37
  • 51
3
votes
1 answer

Jquery escaping selector unrecognized expression: [data-route=search\\/child]

I cant seem to find a work around for this problem. In a SPA app, I have different routes. #/search #/other #/search/child . I parse the hashtag and show/hide an element that contains the attribute data-route. When path is composed by one part…
sesteva
  • 1,716
  • 2
  • 16
  • 17
3
votes
0 answers

flatiron resourcefuljs callback when saving an instance

Suppose i have : var resourceful = require("resourceful"); BaseTopic = function () { this.string("name"); this.string("slug"); } slugify = function (someString) { // do some things here } Topic = resourceful.define("topic",…
Faris Nasution
  • 3,450
  • 5
  • 24
  • 29
3
votes
1 answer

Advice: flatiron, formidable and aws s3

I'm new with serverside programming with node.js. I'm sticking together a tiny webapp with it right now and having the usual startup learning to do. The following piece of code WORKS. But I would love to know if it's more or less a right way to do a…
thgie
  • 2,367
  • 1
  • 18
  • 28
3
votes
2 answers

How to use nconf with flatiron properly

I am trying to build a small framework using flatiron. I want to use nconf to load in all my configuration files so theyre available anywhere in my app. in my root directory I have my app.js, which i want to pull in the config data from…
skift
  • 1,027
  • 2
  • 16
  • 27
1
2 3 4