Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 18 2017 23:46

    JonAbrams on 1.0.0

    Update README.md (compare)

  • Mar 18 2017 23:43

    JonAbrams on 1.0.0

    Update README.md (compare)

  • Mar 18 2017 23:41

    JonAbrams on 1.0.0

    New API design for synth-api (compare)

  • Mar 18 2017 20:28

    JonAbrams on 1.0.0

    (compare)

  • Nov 16 2016 22:34

    JonAbrams on master

    Update README.md (compare)

  • Jul 30 2015 22:24
    JonAbrams commented #85
  • Jul 30 2015 22:24
    JonAbrams closed #85
  • Jul 30 2015 19:53
    Dave93 opened #85
  • Apr 10 2015 20:10
    JonAbrams commented #84
  • Apr 10 2015 20:08

    JonAbrams on gh-pages

    Compile in PR#84 (compare)

  • Apr 10 2015 13:39
    PeachScript commented #84
  • Apr 10 2015 12:18
    JonAbrams commented #84
  • Apr 10 2015 11:58

    JonAbrams on new-project-layout

    Add html build support to gulpf… (compare)

  • Apr 10 2015 11:55
    JonAbrams closed #74
  • Apr 10 2015 11:53

    JonAbrams on gh-pages

    Add language toggle into tutori… Merge pull request #84 from Pea… (compare)

  • Apr 10 2015 11:53
    JonAbrams closed #84
  • Apr 10 2015 11:00
    PeachScript opened #84
  • Mar 24 2015 17:48

    JonAbrams on gulp

    Adjust files to support the new… (compare)

  • Mar 24 2015 16:49

    JonAbrams on new-project-layout

    wip (compare)

  • Mar 14 2015 23:40

    JonAbrams on new-project-layout

    Remove built-in asset compiling… (compare)

Jon Abrams
@JonAbrams
synth.server.on("close", function () {
  synth.services.exec('cleanupDBConnection');
});
the idea being, expose the services as an object that can manually invoke a particular service.
Mikael Møller
@mikaelhm
I guess you would have this in the back-app.js right?
Jon Abrams
@JonAbrams
ya
the alternative is a better system for restarting the server. Instead of unloading and loading the module, kill the process and restart the process.
but it's probably good to expose the services and the server objects regardless.
Mikael Møller
@mikaelhm
Could work as well, then you could do
function cleanup () {
    db.close();
}

process.on('exit', cleanup);
process.on('SIGINT', cleanup);
process.on('SIGTERM', cleanup);
Jon Abrams
@JonAbrams
Hi @mahemoff !
Michael Mahemoff
@mahemoff
Gday :) Just lurking here
Synth looks cool but never enough time for experiments, I'm still Rails all the way on the backend
Jon Abrams
@JonAbrams
Carry on then :sunglasses:
Ya, I use Rails at work
One of these days I'll be able to use Synth at work like @mikaelhm here
Mikael Møller
@mikaelhm
its great!
Jon Abrams
@JonAbrams
I should put that quote on the website
Michael Mahemoff
@mahemoff
do you see synth evolving into something with Rails' (giant) scope?
Mikael Møller
@mikaelhm
You're more than welcome to do that.
Jon Abrams
@JonAbrams
@mahemoff I don't think so, at least not when it comes to ActiveRecord
But ya never know, it very well could
Michael Mahemoff
@mahemoff
Yeah
One reason i moved on from Node a while ago was missing the kinds of features and gems of Rails
Jon Abrams
@JonAbrams
The whole goal is to make it as easy as possible to make a web app, same as Rails, but with a different tech stack
Michael Mahemoff
@mahemoff
Maybe Meteor is something like it now but Synth might also be a different spin on it
Jon Abrams
@JonAbrams
Also, convention over configuration is a big goal too, like Rails
Ya, Meteor is cool, lots of convention, little configuration
Depends on Mongo, right? Yuch
Synth's demo uses Mongo, but right now it's totally persistence layer agnostic.
Michael Mahemoff
@mahemoff
I think it's okay to "bless" a single DB as the convention as long as you can use something else, as with Rails/My
Jon Abrams
@JonAbrams
Sure, I just haven't thought that far enough :)
Mikael Møller
@mikaelhm
Quick question:
But Im not sure where we add appName to the request.
I guess it should be the name from symth.json
Mikael Møller
@mikaelhm
BTW also sent you an email about the company logo on synthjs.com
Jon Abrams
@JonAbrams
Got the email, thanks!
Mikael Møller
@mikaelhm
Got your reply too :)
Jon Abrams
@JonAbrams
Ya, the app name thing is kinda broken now for some reason, I haven't had a chance to look into it.
Mikael Møller
@mikaelhm
Ok I will just create an issue about it.
Jon Abrams
@JonAbrams
IIRC, I added a way to declare custom data for views, defined using the config object, but I haven't documented it yet.
Mikael Møller
@mikaelhm
Ohh thats nice!
Jon Abrams
@JonAbrams
I totally forgot about that feature, I should document these things for myself at least :)
Now I'm wondering if I in fact actually put in this feature.
Looking at the source, I don't see it, sorry!
Mikael Møller
@mikaelhm
Hah, ok :) thats probably why its not documented :)
Jon Abrams
@JonAbrams
Done, Synth 0.6.0 is released! I even made a release on github.
Also, docs updated. Thanks for the help @mikaelhm!
Mikael Møller
@mikaelhm
Awesome! That's great. I will try to finish an example including user Auth.
Kevin Dreßler
@kvndrsslr
Hey guys, i am using synth in an practical course at my university, and i think its a really good approach!
I do like the idea of using synth together with ng-ui-router, as I think that this would allow for a better modularity on both sides of the app whilst keeping the advantage of preloading API-Requests.
Is this a feasible idea in the current project layout, what do you think?
By the way, is there an option to autoreload the frontend on filechanges just like the backend? I love that funcitonality in tools like grunt, would be a good one in my opinion.
Jon Abrams
@JonAbrams
Hi @kvndrsslr! ng-ui-router should work just fine, give it a shot and let us know how it work!
As for auto front-end reloading, that's not built-in yet, but once the new version of synth comes out that has built-in support for gulp, it'll be super easy (if not automatic).