I've been experimenting with Firebase hosting and saw some references to
setting up production and dev nodes.

For our uses I'd ideally like to setup one dev instance, one staging
instance, and one production instance.

When it comes to "nodes," does this mean simply running them out of
different directories? (i.e. a /dev/app/index.html and a
/prod/app/index.html )

Would appreciate an answer to this specific question as well as any general
feedback on best practice around setting up AngularFire production and test
environments.

   Best,

    Jd

--
You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
To post to this group, send email to firebase-angular@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/a0672c58-f747-43d3-85aa-296566a6d533%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Chris Raynor at Aug 22, 2014 at 5:25 pm
    Hey Joel,

    I'm not quite sure of the specific references to nodes, but in this case
    I'd recommend setting up two new Firebases on the free hacker plan - say
    you had coolapp.firebaseapp.com, you could use that for production and have
    coolapp-dev.firebaseapp.com and coolapp-staging.firebaseapp.com. So long as
    the user you are using to deploy is at least a collaborator on all three
    Firebases, all you need do is edit the firebase.json in the project
    directory to point to the specific instance you want to deploy to. This
    also allows you to separate your testing data from your production data

    Hope that helps

    Chris
    Lead Engineer on Firebase Hosting
    On Thursday, August 21, 2014 3:13:34 PM UTC-7, Joel Dietz wrote:


    I've been experimenting with Firebase hosting and saw some references to
    setting up production and dev nodes.

    For our uses I'd ideally like to setup one dev instance, one staging
    instance, and one production instance.

    When it comes to "nodes," does this mean simply running them out of
    different directories? (i.e. a /dev/app/index.html and a
    /prod/app/index.html )

    Would appreciate an answer to this specific question as well as any
    general feedback on best practice around setting up AngularFire production
    and test environments.

    Best,

    Jd
    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/7c30132a-1310-4a37-a57f-e836642bbc55%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • David Langford at Aug 23, 2014 at 2:39 am
    Hey Joel

    The nodes you were referencing was in reply to my email about instance
    setups.

    I didn't use the nodes, it felt too dangerous to me.

    I set up another firebase instance and imported a copy of my data into that.

    I then used ngconstant <https://github.com/werk85/grunt-ng-constant> in my
    grunt file to of two config files depending on which environment I wanted.
    the config file just have the variable FBURL set to one of the instances.

    It is working pretty good for my so far.

    The only trouble I have run into is my simple login users is not synced
    across the two instances. So my test user has a different uid in the dev
    and prod instances. This caused a minor issue because I break up my data
    via the uid. But it hasn't been too bad so I haven't bothered to look into
    how to sync it better.


    ngconstant in my grunt file is set up as follows:

        // So we can have different configs based on environment
         // This can be expanded later on to external config files
         ngconstant: {
           options: {
             name: 'YOURAPP.configGenerated',
             dest: '<%= yeoman.app %>/scripts/configGenerated.js',
             wrap: '\'use strict\';\n\n{%= __ngModule %}',
             space: ' '
           },
           development: {
             constants: {
               ENV: 'development',
               FBURL: 'https://YOURAPP-dev.firebaseio.com'
             }
           },
           production: {
             constants: {
               ENV: 'production',
               FBURL: 'https://YOURAPP-prod.firebaseio.com'
             }
           }
         }


    If you think this will work well for you and you have any dramas I'm happy
    to help more.

    Cheers

    David
    On Saturday, August 23, 2014 3:25:53 AM UTC+10, Chris Raynor wrote:

    Hey Joel,

    I'm not quite sure of the specific references to nodes, but in this case
    I'd recommend setting up two new Firebases on the free hacker plan - say
    you had coolapp.firebaseapp.com, you could use that for production and
    have coolapp-dev.firebaseapp.com and coolapp-staging.firebaseapp.com. So
    long as the user you are using to deploy is at least a collaborator on all
    three Firebases, all you need do is edit the firebase.json in the project
    directory to point to the specific instance you want to deploy to. This
    also allows you to separate your testing data from your production data

    Hope that helps

    Chris
    Lead Engineer on Firebase Hosting
    On Thursday, August 21, 2014 3:13:34 PM UTC-7, Joel Dietz wrote:


    I've been experimenting with Firebase hosting and saw some references to
    setting up production and dev nodes.

    For our uses I'd ideally like to setup one dev instance, one staging
    instance, and one production instance.

    When it comes to "nodes," does this mean simply running them out of
    different directories? (i.e. a /dev/app/index.html and a
    /prod/app/index.html )

    Would appreciate an answer to this specific question as well as any
    general feedback on best practice around setting up AngularFire production
    and test environments.

    Best,

    Jd
    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joel Dietz at Aug 24, 2014 at 12:33 am
    How do you deploy? as far as I can tell from the docs "firebase deploy"
    does not take any additional arguments (i.e. firebase deploy --app YOURAPP1)


    On Fri, Aug 22, 2014 at 7:39 PM, David Langford wrote:

    Hey Joel

    The nodes you were referencing was in reply to my email about instance
    setups.

    I didn't use the nodes, it felt too dangerous to me.

    I set up another firebase instance and imported a copy of my data into
    that.

    I then used ngconstant <https://github.com/werk85/grunt-ng-constant> in
    my grunt file to of two config files depending on which environment I
    wanted. the config file just have the variable FBURL set to one of the
    instances.

    It is working pretty good for my so far.

    The only trouble I have run into is my simple login users is not synced
    across the two instances. So my test user has a different uid in the dev
    and prod instances. This caused a minor issue because I break up my data
    via the uid. But it hasn't been too bad so I haven't bothered to look into
    how to sync it better.


    ngconstant in my grunt file is set up as follows:

    // So we can have different configs based on environment
    // This can be expanded later on to external config files
    ngconstant: {
    options: {
    name: 'YOURAPP.configGenerated',
    dest: '<%= yeoman.app %>/scripts/configGenerated.js',
    wrap: '\'use strict\';\n\n{%= __ngModule %}',
    space: ' '
    },
    development: {
    constants: {
    ENV: 'development',
    FBURL: 'https://YOURAPP-dev.firebaseio.com'
    }
    },
    production: {
    constants: {
    ENV: 'production',
    FBURL: 'https://YOURAPP-prod.firebaseio.com'
    }
    }
    }


    If you think this will work well for you and you have any dramas I'm happy
    to help more.

    Cheers

    David

    On Saturday, August 23, 2014 3:25:53 AM UTC+10, Chris Raynor wrote:

    Hey Joel,

    I'm not quite sure of the specific references to nodes, but in this case
    I'd recommend setting up two new Firebases on the free hacker plan - say
    you had coolapp.firebaseapp.com, you could use that for production and
    have coolapp-dev.firebaseapp.com and coolapp-staging.firebaseapp.com. So
    long as the user you are using to deploy is at least a collaborator on all
    three Firebases, all you need do is edit the firebase.json in the project
    directory to point to the specific instance you want to deploy to. This
    also allows you to separate your testing data from your production data

    Hope that helps

    Chris
    Lead Engineer on Firebase Hosting
    On Thursday, August 21, 2014 3:13:34 PM UTC-7, Joel Dietz wrote:


    I've been experimenting with Firebase hosting and saw some references
    to setting up production and dev nodes.

    For our uses I'd ideally like to setup one dev instance, one staging
    instance, and one production instance.

    When it comes to "nodes," does this mean simply running them out of
    different directories? (i.e. a /dev/app/index.html and a
    /prod/app/index.html )

    Would appreciate an answer to this specific question as well as any
    general feedback on best practice around setting up AngularFire production
    and test environments.

    Best,

    Jd
    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Jacob Wenger at Aug 24, 2014 at 1:08 am
    Hey Joel,

    The Firebase you are deploying for is specified in your firebase.json file
    as the firebase attribute.

    Jacob

    On Sat, Aug 23, 2014 at 1:36 PM, Joel Dietz wrote:

    How do you deploy? as far as I can tell from the docs "firebase deploy"
    does not take any additional arguments (i.e. firebase deploy --app YOURAPP1)


    On Fri, Aug 22, 2014 at 7:39 PM, David Langford wrote:

    Hey Joel

    The nodes you were referencing was in reply to my email about instance
    setups.

    I didn't use the nodes, it felt too dangerous to me.

    I set up another firebase instance and imported a copy of my data into
    that.

    I then used ngconstant <https://github.com/werk85/grunt-ng-constant> in
    my grunt file to of two config files depending on which environment I
    wanted. the config file just have the variable FBURL set to one of the
    instances.

    It is working pretty good for my so far.

    The only trouble I have run into is my simple login users is not synced
    across the two instances. So my test user has a different uid in the dev
    and prod instances. This caused a minor issue because I break up my data
    via the uid. But it hasn't been too bad so I haven't bothered to look into
    how to sync it better.


    ngconstant in my grunt file is set up as follows:

    // So we can have different configs based on environment
    // This can be expanded later on to external config files
    ngconstant: {
    options: {
    name: 'YOURAPP.configGenerated',
    dest: '<%= yeoman.app %>/scripts/configGenerated.js',
    wrap: '\'use strict\';\n\n{%= __ngModule %}',
    space: ' '
    },
    development: {
    constants: {
    ENV: 'development',
    FBURL: 'https://YOURAPP-dev.firebaseio.com'
    }
    },
    production: {
    constants: {
    ENV: 'production',
    FBURL: 'https://YOURAPP-prod.firebaseio.com'
    }
    }
    }


    If you think this will work well for you and you have any dramas I'm
    happy to help more.

    Cheers

    David

    On Saturday, August 23, 2014 3:25:53 AM UTC+10, Chris Raynor wrote:

    Hey Joel,

    I'm not quite sure of the specific references to nodes, but in this case
    I'd recommend setting up two new Firebases on the free hacker plan - say
    you had coolapp.firebaseapp.com, you could use that for production and
    have coolapp-dev.firebaseapp.com and coolapp-staging.firebaseapp.com.
    So long as the user you are using to deploy is at least a collaborator on
    all three Firebases, all you need do is edit the firebase.json in the
    project directory to point to the specific instance you want to deploy to.
    This also allows you to separate your testing data from your production data

    Hope that helps

    Chris
    Lead Engineer on Firebase Hosting
    On Thursday, August 21, 2014 3:13:34 PM UTC-7, Joel Dietz wrote:


    I've been experimenting with Firebase hosting and saw some references
    to setting up production and dev nodes.

    For our uses I'd ideally like to setup one dev instance, one staging
    instance, and one production instance.

    When it comes to "nodes," does this mean simply running them out of
    different directories? (i.e. a /dev/app/index.html and a
    /prod/app/index.html )

    Would appreciate an answer to this specific question as well as any
    general feedback on best practice around setting up AngularFire production
    and test environments.

    Best,

    Jd
    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/CAKZX5-4%3DxWu3ghfUrtx1SBRtk3TKWUetZKDc6vpr2TzYn16jxQ%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joel Dietz at Aug 24, 2014 at 5:47 am
    I'm assuming I can't do something like: "firebase": [
    "blinding-flame-1234", "shooting-fire-4321" ]

    So looks like the right answer is a custom build script that does something
    like.

       firebase deploy
       firebase deploy --firebase shooting-fire-4321


    Probably ideally pushing syncing data between the firebase instances as
    well, although I have no idea how to do that yet. Ideas?


       Jd


    On Sat, Aug 23, 2014 at 6:08 PM, Jacob Wenger wrote:

    Hey Joel,

    The Firebase you are deploying for is specified in your firebase.json
    file as the firebase attribute.

    Jacob

    On Sat, Aug 23, 2014 at 1:36 PM, Joel Dietz wrote:

    How do you deploy? as far as I can tell from the docs "firebase deploy"
    does not take any additional arguments (i.e. firebase deploy --app YOURAPP1)



    On Fri, Aug 22, 2014 at 7:39 PM, David Langford <langford.d@gmail.com>
    wrote:
    Hey Joel

    The nodes you were referencing was in reply to my email about instance
    setups.

    I didn't use the nodes, it felt too dangerous to me.

    I set up another firebase instance and imported a copy of my data into
    that.

    I then used ngconstant <https://github.com/werk85/grunt-ng-constant> in
    my grunt file to of two config files depending on which environment I
    wanted. the config file just have the variable FBURL set to one of the
    instances.

    It is working pretty good for my so far.

    The only trouble I have run into is my simple login users is not synced
    across the two instances. So my test user has a different uid in the dev
    and prod instances. This caused a minor issue because I break up my data
    via the uid. But it hasn't been too bad so I haven't bothered to look into
    how to sync it better.


    ngconstant in my grunt file is set up as follows:

    // So we can have different configs based on environment
    // This can be expanded later on to external config files
    ngconstant: {
    options: {
    name: 'YOURAPP.configGenerated',
    dest: '<%= yeoman.app %>/scripts/configGenerated.js',
    wrap: '\'use strict\';\n\n{%= __ngModule %}',
    space: ' '
    },
    development: {
    constants: {
    ENV: 'development',
    FBURL: 'https://YOURAPP-dev.firebaseio.com'
    }
    },
    production: {
    constants: {
    ENV: 'production',
    FBURL: 'https://YOURAPP-prod.firebaseio.com'
    }
    }
    }


    If you think this will work well for you and you have any dramas I'm
    happy to help more.

    Cheers

    David

    On Saturday, August 23, 2014 3:25:53 AM UTC+10, Chris Raynor wrote:

    Hey Joel,

    I'm not quite sure of the specific references to nodes, but in this
    case I'd recommend setting up two new Firebases on the free hacker plan -
    say you had coolapp.firebaseapp.com, you could use that for production
    and have coolapp-dev.firebaseapp.com and coolapp-staging.firebaseapp.
    com. So long as the user you are using to deploy is at least a
    collaborator on all three Firebases, all you need do is edit the
    firebase.json in the project directory to point to the specific instance
    you want to deploy to. This also allows you to separate your testing data
    from your production data

    Hope that helps

    Chris
    Lead Engineer on Firebase Hosting
    On Thursday, August 21, 2014 3:13:34 PM UTC-7, Joel Dietz wrote:


    I've been experimenting with Firebase hosting and saw some references
    to setting up production and dev nodes.

    For our uses I'd ideally like to setup one dev instance, one staging
    instance, and one production instance.

    When it comes to "nodes," does this mean simply running them out of
    different directories? (i.e. a /dev/app/index.html and a
    /prod/app/index.html )

    Would appreciate an answer to this specific question as well as any
    general feedback on best practice around setting up AngularFire production
    and test environments.

    Best,

    Jd
    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/CAKZX5-4%3DxWu3ghfUrtx1SBRtk3TKWUetZKDc6vpr2TzYn16jxQ%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CAKZX5-4%3DxWu3ghfUrtx1SBRtk3TKWUetZKDc6vpr2TzYn16jxQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
      joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3iMCwUMX2J85T7B9kRKhgZLuS14XEKZ6bvu_H2J1nLQrA%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Jacob Wenger at Aug 24, 2014 at 5:55 am
    Hey Joel,

    Yeah you can do deploy to multiple firebase's using a single firebase deploy
    command. You could definitely script a solution for that in a minute or two
    though. What you suggested seems reasonable.

    As for syncing between your Firebases, you could also add that to your
    script. (Note: I'm assuming this is a one-time sync at deploy time, not a
    constant sync). For example, you could just have a node script which does
    an once.value() at the root and then use the snapshot value to do a set() at
    the root of the other firebase. It would be a super small script, something
    like this in a syncFirebase.js file:

    var Firebase = require("firebase");

    var developmentFirebaseRef = new
    Firebase("https://<your-dev-firebase>.firebaseio.com");
    var productionFirebaseRef = new
    Firebase("https://<your-prod-firebase>.firebaseio.com");

    productionFirebaseRef.on("value", function(snapshot) {
       developmentFirebaseRef.set(snapshot.val());
    });

    Then in your deploy script you would just call node syncFirebase.js. Just
    be wary that if you have a lot of data, this could be an expensive
    operation.

    Hope that helps,
    Jacob
    On Saturday, August 23, 2014 10:47:51 PM UTC-7, Joel Dietz wrote:

    I'm assuming I can't do something like: "firebase": [
    "blinding-flame-1234", "shooting-fire-4321" ]

    So looks like the right answer is a custom build script that does
    something like.

    firebase deploy
    firebase deploy --firebase shooting-fire-4321


    Probably ideally pushing syncing data between the firebase instances as
    well, although I have no idea how to do that yet. Ideas?


    Jd


    On Sat, Aug 23, 2014 at 6:08 PM, Jacob Wenger wrote:

    Hey Joel,

    The Firebase you are deploying for is specified in your firebase.json
    file as the firebase attribute.

    Jacob

    On Sat, Aug 23, 2014 at 1:36 PM, Joel Dietz wrote:

    How do you deploy? as far as I can tell from the docs "firebase deploy"
    does not take any additional arguments (i.e. firebase deploy --app YOURAPP1)



    On Fri, Aug 22, 2014 at 7:39 PM, David Langford <langford.d@gmail.com>
    wrote:
    Hey Joel

    The nodes you were referencing was in reply to my email about instance
    setups.

    I didn't use the nodes, it felt too dangerous to me.

    I set up another firebase instance and imported a copy of my data into
    that.

    I then used ngconstant <https://github.com/werk85/grunt-ng-constant>
    in my grunt file to of two config files depending on which environment I
    wanted. the config file just have the variable FBURL set to one of the
    instances.

    It is working pretty good for my so far.

    The only trouble I have run into is my simple login users is not synced
    across the two instances. So my test user has a different uid in the dev
    and prod instances. This caused a minor issue because I break up my data
    via the uid. But it hasn't been too bad so I haven't bothered to look into
    how to sync it better.


    ngconstant in my grunt file is set up as follows:

    // So we can have different configs based on environment
    // This can be expanded later on to external config files
    ngconstant: {
    options: {
    name: 'YOURAPP.configGenerated',
    dest: '<%= yeoman.app %>/scripts/configGenerated.js',
    wrap: '\'use strict\';\n\n{%= __ngModule %}',
    space: ' '
    },
    development: {
    constants: {
    ENV: 'development',
    FBURL: 'https://YOURAPP-dev.firebaseio.com'
    }
    },
    production: {
    constants: {
    ENV: 'production',
    FBURL: 'https://YOURAPP-prod.firebaseio.com'
    }
    }
    }


    If you think this will work well for you and you have any dramas I'm
    happy to help more.

    Cheers

    David

    On Saturday, August 23, 2014 3:25:53 AM UTC+10, Chris Raynor wrote:

    Hey Joel,

    I'm not quite sure of the specific references to nodes, but in this
    case I'd recommend setting up two new Firebases on the free hacker plan -
    say you had coolapp.firebaseapp.com, you could use that for
    production and have coolapp-dev.firebaseapp.com and
    coolapp-staging.firebaseapp.com. So long as the user you are using to
    deploy is at least a collaborator on all three Firebases, all you need do
    is edit the firebase.json in the project directory to point to the specific
    instance you want to deploy to. This also allows you to separate your
    testing data from your production data

    Hope that helps

    Chris
    Lead Engineer on Firebase Hosting
    On Thursday, August 21, 2014 3:13:34 PM UTC-7, Joel Dietz wrote:


    I've been experimenting with Firebase hosting and saw some
    references to setting up production and dev nodes.

    For our uses I'd ideally like to setup one dev instance, one staging
    instance, and one production instance.

    When it comes to "nodes," does this mean simply running them out of
    different directories? (i.e. a /dev/app/index.html and a
    /prod/app/index.html )

    Would appreciate an answer to this specific question as well as any
    general feedback on best practice around setting up AngularFire production
    and test environments.

    Best,

    Jd
    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/CAKZX5-4%3DxWu3ghfUrtx1SBRtk3TKWUetZKDc6vpr2TzYn16jxQ%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CAKZX5-4%3DxWu3ghfUrtx1SBRtk3TKWUetZKDc6vpr2TzYn16jxQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co
    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/02893f31-ffcf-4ae6-9463-019fcb1c2c77%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joel Dietz at Aug 24, 2014 at 7:02 am
    Jacob,

    Looks great. Wouldn't this have the problem of resetting the users though?
    My understanding is that if you are using simplelogin then you can't move
    the accounts from one instance to another? It looks like what you've got
    there will flush out the users in the development without pushing through
    the user active in production (but I could be and probably am wrong here).

    Jd

    On Sat, Aug 23, 2014 at 10:55 PM, Jacob Wenger wrote:

    Hey Joel,

    Yeah you can do deploy to multiple firebase's using a single firebase
    deploy command. You could definitely script a solution for that in a
    minute or two though. What you suggested seems reasonable.

    As for syncing between your Firebases, you could also add that to your
    script. (Note: I'm assuming this is a one-time sync at deploy time, not a
    constant sync). For example, you could just have a node script which does
    an once.value() at the root and then use the snapshot value to do a set() at
    the root of the other firebase. It would be a super small script, something
    like this in a syncFirebase.js file:

    var Firebase = require("firebase");

    var developmentFirebaseRef = new Firebase("https://<your-dev-firebase>.
    firebaseio.com");
    var productionFirebaseRef = new Firebase("https://<your-prod-firebase>.
    firebaseio.com");

    productionFirebaseRef.on("value", function(snapshot) {
    developmentFirebaseRef.set(snapshot.val());
    });

    Then in your deploy script you would just call node syncFirebase.js. Just
    be wary that if you have a lot of data, this could be an expensive
    operation.

    Hope that helps,
    Jacob

    On Saturday, August 23, 2014 10:47:51 PM UTC-7, Joel Dietz wrote:

    I'm assuming I can't do something like: "firebase": [
    "blinding-flame-1234", "shooting-fire-4321" ]

    So looks like the right answer is a custom build script that does
    something like.

    firebase deploy
    firebase deploy --firebase shooting-fire-4321


    Probably ideally pushing syncing data between the firebase instances as
    well, although I have no idea how to do that yet. Ideas?


    Jd


    On Sat, Aug 23, 2014 at 6:08 PM, Jacob Wenger wrote:

    Hey Joel,

    The Firebase you are deploying for is specified in your firebase.json
    file as the firebase attribute.

    Jacob

    On Sat, Aug 23, 2014 at 1:36 PM, Joel Dietz wrote:

    How do you deploy? as far as I can tell from the docs "firebase deploy"
    does not take any additional arguments (i.e. firebase deploy --app YOURAPP1)



    On Fri, Aug 22, 2014 at 7:39 PM, David Langford <langford.d@gmail.com>
    wrote:
    Hey Joel

    The nodes you were referencing was in reply to my email about instance
    setups.

    I didn't use the nodes, it felt too dangerous to me.

    I set up another firebase instance and imported a copy of my data into
    that.

    I then used ngconstant <https://github.com/werk85/grunt-ng-constant>
    in my grunt file to of two config files depending on which environment I
    wanted. the config file just have the variable FBURL set to one of the
    instances.

    It is working pretty good for my so far.

    The only trouble I have run into is my simple login users is not
    synced across the two instances. So my test user has a different uid in the
    dev and prod instances. This caused a minor issue because I break up my
    data via the uid. But it hasn't been too bad so I haven't bothered to look
    into how to sync it better.


    ngconstant in my grunt file is set up as follows:

    // So we can have different configs based on environment
    // This can be expanded later on to external config files
    ngconstant: {
    options: {
    name: 'YOURAPP.configGenerated',
    dest: '<%= yeoman.app %>/scripts/configGenerated.js',
    wrap: '\'use strict\';\n\n{%= __ngModule %}',
    space: ' '
    },
    development: {
    constants: {
    ENV: 'development',
    FBURL: 'https://YOURAPP-dev.firebaseio.com'
    }
    },
    production: {
    constants: {
    ENV: 'production',
    FBURL: 'https://YOURAPP-prod.firebaseio.com'
    }
    }
    }


    If you think this will work well for you and you have any dramas I'm
    happy to help more.

    Cheers

    David

    On Saturday, August 23, 2014 3:25:53 AM UTC+10, Chris Raynor wrote:

    Hey Joel,

    I'm not quite sure of the specific references to nodes, but in this
    case I'd recommend setting up two new Firebases on the free hacker plan -
    say you had coolapp.firebaseapp.com, you could use that for
    production and have coolapp-dev.firebaseapp.com and
    coolapp-staging.firebaseapp.com. So long as the user you are using
    to deploy is at least a collaborator on all three Firebases, all you need
    do is edit the firebase.json in the project directory to point to the
    specific instance you want to deploy to. This also allows you to separate
    your testing data from your production data

    Hope that helps

    Chris
    Lead Engineer on Firebase Hosting
    On Thursday, August 21, 2014 3:13:34 PM UTC-7, Joel Dietz wrote:


    I've been experimenting with Firebase hosting and saw some
    references to setting up production and dev nodes.

    For our uses I'd ideally like to setup one dev instance, one staging
    instance, and one production instance.

    When it comes to "nodes," does this mean simply running them out of
    different directories? (i.e. a /dev/app/index.html and a
    /prod/app/index.html )

    Would appreciate an answer to this specific question as well as any
    general feedback on best practice around setting up AngularFire production
    and test environments.

    Best,

    Jd
    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com
    .
    To view this discussion on the web visit https://groups.google.com/d/
    msgid/firebase-angular/3ada872d-9262-4a61-9cb5-
    d87ec0c80896%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/
    msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-
    0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/
    msgid/firebase-angular/CAKZX5-4%3DxWu3ghfUrtx1SBRtk3TKWUetZKDc
    6vpr2TzYn16jxQ%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CAKZX5-4%3DxWu3ghfUrtx1SBRtk3TKWUetZKDc6vpr2TzYn16jxQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/02893f31-ffcf-4ae6-9463-019fcb1c2c77%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/02893f31-ffcf-4ae6-9463-019fcb1c2c77%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3ginB1z6JbjL_F5b82u9f6n9Mc98qOjLWYD3%2BErtw3%2Bew%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • David Langford at Aug 24, 2014 at 7:19 am
    I don't have a public repo yet sorry. But running the commands under usage
    <https://github.com/yeoman/generator-angular#usage> will create a new
    project for you, that you can have a look at.

    Grunt <http://gruntjs.com/> allows you to group a bunch of commands under a
    single job. So in mine, I can run *grunt serve* and it will validate my
    javascript, run my unitests, make sure my config points to development,
    spin up a webserver to host the website locally, then watch my files (it
    will update the webpage whenever I save so I don't have to refresh). It's
    pretty handy and I can recommend getting an understanding of it.

    With regards to the updating the* firebase *variable in *firebase.js. *From
    what I read, that won't solve your problem. It will just host it on
    Instance A but it will use the data from Instance B. This would be because
    your *config.js *will still have its *FBURL* variable set to Instance B and
    that is the data you will use. Unless I'm missing something?

    On Sun, Aug 24, 2014 at 5:02 PM, Joel Dietz wrote:

    Jacob,

    Looks great. Wouldn't this have the problem of resetting the users though?
    My understanding is that if you are using simplelogin then you can't move
    the accounts from one instance to another? It looks like what you've got
    there will flush out the users in the development without pushing through
    the user active in production (but I could be and probably am wrong here).

    Jd

    On Sat, Aug 23, 2014 at 10:55 PM, Jacob Wenger wrote:

    Hey Joel,

    Yeah you can do deploy to multiple firebase's using a single firebase
    deploy command. You could definitely script a solution for that in a
    minute or two though. What you suggested seems reasonable.

    As for syncing between your Firebases, you could also add that to your
    script. (Note: I'm assuming this is a one-time sync at deploy time, not a
    constant sync). For example, you could just have a node script which does
    an once.value() at the root and then use the snapshot value to do a set() at
    the root of the other firebase. It would be a super small script, something
    like this in a syncFirebase.js file:

    var Firebase = require("firebase");

    var developmentFirebaseRef = new Firebase("https://<your-dev-firebase>.
    firebaseio.com");
    var productionFirebaseRef = new Firebase("https://<your-prod-firebase>.
    firebaseio.com");

    productionFirebaseRef.on("value", function(snapshot) {
    developmentFirebaseRef.set(snapshot.val());
    });

    Then in your deploy script you would just call node syncFirebase.js.
    Just be wary that if you have a lot of data, this could be an expensive
    operation.

    Hope that helps,
    Jacob

    On Saturday, August 23, 2014 10:47:51 PM UTC-7, Joel Dietz wrote:

    I'm assuming I can't do something like: "firebase": [
    "blinding-flame-1234", "shooting-fire-4321" ]

    So looks like the right answer is a custom build script that does
    something like.

    firebase deploy
    firebase deploy --firebase shooting-fire-4321


    Probably ideally pushing syncing data between the firebase instances as
    well, although I have no idea how to do that yet. Ideas?


    Jd



    On Sat, Aug 23, 2014 at 6:08 PM, Jacob Wenger <jacob@firebase.com>
    wrote:
    Hey Joel,

    The Firebase you are deploying for is specified in your firebase.json
    file as the firebase attribute.

    Jacob

    On Sat, Aug 23, 2014 at 1:36 PM, Joel Dietz wrote:

    How do you deploy? as far as I can tell from the docs "firebase
    deploy" does not take any additional arguments (i.e. firebase deploy --app
    YOURAPP1)



    On Fri, Aug 22, 2014 at 7:39 PM, David Langford <langford.d@gmail.com>
    wrote:
    Hey Joel

    The nodes you were referencing was in reply to my email about
    instance setups.

    I didn't use the nodes, it felt too dangerous to me.

    I set up another firebase instance and imported a copy of my data
    into that.

    I then used ngconstant <https://github.com/werk85/grunt-ng-constant>
    in my grunt file to of two config files depending on which environment I
    wanted. the config file just have the variable FBURL set to one of the
    instances.

    It is working pretty good for my so far.

    The only trouble I have run into is my simple login users is not
    synced across the two instances. So my test user has a different uid in the
    dev and prod instances. This caused a minor issue because I break up my
    data via the uid. But it hasn't been too bad so I haven't bothered to look
    into how to sync it better.


    ngconstant in my grunt file is set up as follows:

    // So we can have different configs based on environment
    // This can be expanded later on to external config files
    ngconstant: {
    options: {
    name: 'YOURAPP.configGenerated',
    dest: '<%= yeoman.app %>/scripts/configGenerated.js',
    wrap: '\'use strict\';\n\n{%= __ngModule %}',
    space: ' '
    },
    development: {
    constants: {
    ENV: 'development',
    FBURL: 'https://YOURAPP-dev.firebaseio.com'
    }
    },
    production: {
    constants: {
    ENV: 'production',
    FBURL: 'https://YOURAPP-prod.firebaseio.com'
    }
    }
    }


    If you think this will work well for you and you have any dramas I'm
    happy to help more.

    Cheers

    David

    On Saturday, August 23, 2014 3:25:53 AM UTC+10, Chris Raynor wrote:

    Hey Joel,

    I'm not quite sure of the specific references to nodes, but in this
    case I'd recommend setting up two new Firebases on the free hacker plan -
    say you had coolapp.firebaseapp.com, you could use that for
    production and have coolapp-dev.firebaseapp.com and
    coolapp-staging.firebaseapp.com. So long as the user you are using
    to deploy is at least a collaborator on all three Firebases, all you need
    do is edit the firebase.json in the project directory to point to the
    specific instance you want to deploy to. This also allows you to separate
    your testing data from your production data

    Hope that helps

    Chris
    Lead Engineer on Firebase Hosting
    On Thursday, August 21, 2014 3:13:34 PM UTC-7, Joel Dietz wrote:


    I've been experimenting with Firebase hosting and saw some
    references to setting up production and dev nodes.

    For our uses I'd ideally like to setup one dev instance, one
    staging instance, and one production instance.

    When it comes to "nodes," does this mean simply running them out of
    different directories? (i.e. a /dev/app/index.html and a
    /prod/app/index.html )

    Would appreciate an answer to this specific question as well as any
    general feedback on best practice around setting up AngularFire production
    and test environments.

    Best,

    Jd
    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.
    com.
    To view this discussion on the web visit https://groups.google.com/d/
    msgid/firebase-angular/3ada872d-9262-4a61-9cb5-
    d87ec0c80896%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com
    .
    To view this discussion on the web visit https://groups.google.com/d/
    msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-
    0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/
    msgid/firebase-angular/CAKZX5-4%3DxWu3ghfUrtx1SBRtk3TKWUetZKDc
    6vpr2TzYn16jxQ%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CAKZX5-4%3DxWu3ghfUrtx1SBRtk3TKWUetZKDc6vpr2TzYn16jxQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/02893f31-ffcf-4ae6-9463-019fcb1c2c77%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/02893f31-ffcf-4ae6-9463-019fcb1c2c77%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to a topic in the
    Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/firebase-angular/qUBvGLNz4Ks/unsubscribe
    .
    To unsubscribe from this group and all its topics, send an email to
    firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3ginB1z6JbjL_F5b82u9f6n9Mc98qOjLWYD3%2BErtw3%2Bew%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3ginB1z6JbjL_F5b82u9f6n9Mc98qOjLWYD3%2BErtw3%2Bew%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --
    - David

    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/CAMRouG4eVJYiGqB76EGD6muDZfdHiLp3Lfx7E9WWVRgJzfZBYQ%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Jacob Wenger at Aug 24, 2014 at 7:21 am
    Hey Joel,

    The code I provided deals with data only, not users. You are correct in
    saying that there is no way to copy your Simple Login users from one
    Firebase to another. However, if you store user-specific information in say
    a /users/ node, you could definitely transfer that over using the method I
    suggested.

    Jacob

    On Sun, Aug 24, 2014 at 12:19 AM, David Langford wrote:

    I don't have a public repo yet sorry. But running the commands under usage
    <https://github.com/yeoman/generator-angular#usage> will create a new
    project for you, that you can have a look at.

    Grunt <http://gruntjs.com/> allows you to group a bunch of commands under
    a single job. So in mine, I can run *grunt serve* and it will validate my
    javascript, run my unitests, make sure my config points to development,
    spin up a webserver to host the website locally, then watch my files (it
    will update the webpage whenever I save so I don't have to refresh). It's
    pretty handy and I can recommend getting an understanding of it.

    With regards to the updating the* firebase *variable in *firebase.js. *From
    what I read, that won't solve your problem. It will just host it on
    Instance A but it will use the data from Instance B. This would be because
    your *config.js *will still have its *FBURL* variable set to Instance B
    and that is the data you will use. Unless I'm missing something?

    On Sun, Aug 24, 2014 at 5:02 PM, Joel Dietz wrote:

    Jacob,

    Looks great. Wouldn't this have the problem of resetting the users
    though? My understanding is that if you are using simplelogin then you
    can't move the accounts from one instance to another? It looks like what
    you've got there will flush out the users in the development without
    pushing through the user active in production (but I could be and probably
    am wrong here).

    Jd


    On Sat, Aug 23, 2014 at 10:55 PM, Jacob Wenger <jacob@firebase.com>
    wrote:
    Hey Joel,

    Yeah you can do deploy to multiple firebase's using a single firebase
    deploy command. You could definitely script a solution for that in a
    minute or two though. What you suggested seems reasonable.

    As for syncing between your Firebases, you could also add that to your
    script. (Note: I'm assuming this is a one-time sync at deploy time, not a
    constant sync). For example, you could just have a node script which does
    an once.value() at the root and then use the snapshot value to do a
    set() at the root of the other firebase. It would be a super small
    script, something like this in a syncFirebase.js file:

    var Firebase = require("firebase");

    var developmentFirebaseRef = new Firebase("https://<your-dev-firebase>.
    firebaseio.com");
    var productionFirebaseRef = new Firebase("https://<your-prod-firebase>.
    firebaseio.com");

    productionFirebaseRef.on("value", function(snapshot) {
    developmentFirebaseRef.set(snapshot.val());
    });

    Then in your deploy script you would just call node syncFirebase.js.
    Just be wary that if you have a lot of data, this could be an expensive
    operation.

    Hope that helps,
    Jacob

    On Saturday, August 23, 2014 10:47:51 PM UTC-7, Joel Dietz wrote:

    I'm assuming I can't do something like: "firebase": [
    "blinding-flame-1234", "shooting-fire-4321" ]

    So looks like the right answer is a custom build script that does
    something like.

    firebase deploy
    firebase deploy --firebase shooting-fire-4321


    Probably ideally pushing syncing data between the firebase instances as
    well, although I have no idea how to do that yet. Ideas?


    Jd



    On Sat, Aug 23, 2014 at 6:08 PM, Jacob Wenger <jacob@firebase.com>
    wrote:
    Hey Joel,

    The Firebase you are deploying for is specified in your firebase.json
    file as the firebase attribute.

    Jacob


    On Sat, Aug 23, 2014 at 1:36 PM, Joel Dietz <joel@swarmcorp.com>
    wrote:
    How do you deploy? as far as I can tell from the docs "firebase
    deploy" does not take any additional arguments (i.e. firebase deploy --app
    YOURAPP1)



    On Fri, Aug 22, 2014 at 7:39 PM, David Langford <langford.d@gmail.com
    wrote:
    Hey Joel

    The nodes you were referencing was in reply to my email about
    instance setups.

    I didn't use the nodes, it felt too dangerous to me.

    I set up another firebase instance and imported a copy of my data
    into that.

    I then used ngconstant <https://github.com/werk85/grunt-ng-constant>
    in my grunt file to of two config files depending on which environment I
    wanted. the config file just have the variable FBURL set to one of the
    instances.

    It is working pretty good for my so far.

    The only trouble I have run into is my simple login users is not
    synced across the two instances. So my test user has a different uid in the
    dev and prod instances. This caused a minor issue because I break up my
    data via the uid. But it hasn't been too bad so I haven't bothered to look
    into how to sync it better.


    ngconstant in my grunt file is set up as follows:

    // So we can have different configs based on environment
    // This can be expanded later on to external config files
    ngconstant: {
    options: {
    name: 'YOURAPP.configGenerated',
    dest: '<%= yeoman.app %>/scripts/configGenerated.js',
    wrap: '\'use strict\';\n\n{%= __ngModule %}',
    space: ' '
    },
    development: {
    constants: {
    ENV: 'development',
    FBURL: 'https://YOURAPP-dev.firebaseio.com'
    }
    },
    production: {
    constants: {
    ENV: 'production',
    FBURL: 'https://YOURAPP-prod.firebaseio.com'
    }
    }
    }


    If you think this will work well for you and you have any dramas I'm
    happy to help more.

    Cheers

    David

    On Saturday, August 23, 2014 3:25:53 AM UTC+10, Chris Raynor wrote:

    Hey Joel,

    I'm not quite sure of the specific references to nodes, but in this
    case I'd recommend setting up two new Firebases on the free hacker plan -
    say you had coolapp.firebaseapp.com, you could use that for
    production and have coolapp-dev.firebaseapp.com and
    coolapp-staging.firebaseapp.com. So long as the user you are using
    to deploy is at least a collaborator on all three Firebases, all you need
    do is edit the firebase.json in the project directory to point to the
    specific instance you want to deploy to. This also allows you to separate
    your testing data from your production data

    Hope that helps

    Chris
    Lead Engineer on Firebase Hosting
    On Thursday, August 21, 2014 3:13:34 PM UTC-7, Joel Dietz wrote:


    I've been experimenting with Firebase hosting and saw some
    references to setting up production and dev nodes.

    For our uses I'd ideally like to setup one dev instance, one
    staging instance, and one production instance.

    When it comes to "nodes," does this mean simply running them out
    of different directories? (i.e. a /dev/app/index.html and a
    /prod/app/index.html )

    Would appreciate an answer to this specific question as well as
    any general feedback on best practice around setting up AngularFire
    production and test environments.

    Best,

    Jd
    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.
    com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/
    3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.
    com.
    To view this discussion on the web visit https://groups.google.com/d/
    msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-
    0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com
    .
    To view this discussion on the web visit https://groups.google.com/d/
    msgid/firebase-angular/CAKZX5-4%3DxWu3ghfUrtx1SBRtk3TKWUetZKDc
    6vpr2TzYn16jxQ%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CAKZX5-4%3DxWu3ghfUrtx1SBRtk3TKWUetZKDc6vpr2TzYn16jxQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/02893f31-ffcf-4ae6-9463-019fcb1c2c77%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/02893f31-ffcf-4ae6-9463-019fcb1c2c77%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to a topic in the
    Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/firebase-angular/qUBvGLNz4Ks/unsubscribe
    .
    To unsubscribe from this group and all its topics, send an email to
    firebase-angular+unsubscribe@googlegroups.com.

    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3ginB1z6JbjL_F5b82u9f6n9Mc98qOjLWYD3%2BErtw3%2Bew%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3ginB1z6JbjL_F5b82u9f6n9Mc98qOjLWYD3%2BErtw3%2Bew%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --
    - David

    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/CAMRouG4eVJYiGqB76EGD6muDZfdHiLp3Lfx7E9WWVRgJzfZBYQ%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CAMRouG4eVJYiGqB76EGD6muDZfdHiLp3Lfx7E9WWVRgJzfZBYQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/CAKZX5-5xc0mNE0b7Apw2ORFsFEM0Y8hqN_%3D8cvifu8gn8rudaw%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Piotr Kaminski at Aug 24, 2014 at 1:12 am
    Actually, if you run "firebase deploy --help", you'll see that there's a
    "--firebase" parameter that's not mentioned in the docs.

         -- P.


    On Sat, Aug 23, 2014 at 1:36 PM, Joel Dietz wrote:

    How do you deploy? as far as I can tell from the docs "firebase deploy"
    does not take any additional arguments (i.e. firebase deploy --app YOURAPP1)


    On Fri, Aug 22, 2014 at 7:39 PM, David Langford wrote:

    Hey Joel

    The nodes you were referencing was in reply to my email about instance
    setups.

    I didn't use the nodes, it felt too dangerous to me.

    I set up another firebase instance and imported a copy of my data into
    that.

    I then used ngconstant <https://github.com/werk85/grunt-ng-constant> in
    my grunt file to of two config files depending on which environment I
    wanted. the config file just have the variable FBURL set to one of the
    instances.

    It is working pretty good for my so far.

    The only trouble I have run into is my simple login users is not synced
    across the two instances. So my test user has a different uid in the dev
    and prod instances. This caused a minor issue because I break up my data
    via the uid. But it hasn't been too bad so I haven't bothered to look into
    how to sync it better.


    ngconstant in my grunt file is set up as follows:

    // So we can have different configs based on environment
    // This can be expanded later on to external config files
    ngconstant: {
    options: {
    name: 'YOURAPP.configGenerated',
    dest: '<%= yeoman.app %>/scripts/configGenerated.js',
    wrap: '\'use strict\';\n\n{%= __ngModule %}',
    space: ' '
    },
    development: {
    constants: {
    ENV: 'development',
    FBURL: 'https://YOURAPP-dev.firebaseio.com'
    }
    },
    production: {
    constants: {
    ENV: 'production',
    FBURL: 'https://YOURAPP-prod.firebaseio.com'
    }
    }
    }


    If you think this will work well for you and you have any dramas I'm
    happy to help more.

    Cheers

    David

    On Saturday, August 23, 2014 3:25:53 AM UTC+10, Chris Raynor wrote:

    Hey Joel,

    I'm not quite sure of the specific references to nodes, but in this case
    I'd recommend setting up two new Firebases on the free hacker plan - say
    you had coolapp.firebaseapp.com, you could use that for production and
    have coolapp-dev.firebaseapp.com and coolapp-staging.firebaseapp.com.
    So long as the user you are using to deploy is at least a collaborator on
    all three Firebases, all you need do is edit the firebase.json in the
    project directory to point to the specific instance you want to deploy to.
    This also allows you to separate your testing data from your production data

    Hope that helps

    Chris
    Lead Engineer on Firebase Hosting
    On Thursday, August 21, 2014 3:13:34 PM UTC-7, Joel Dietz wrote:


    I've been experimenting with Firebase hosting and saw some references
    to setting up production and dev nodes.

    For our uses I'd ideally like to setup one dev instance, one staging
    instance, and one production instance.

    When it comes to "nodes," does this mean simply running them out of
    different directories? (i.e. a /dev/app/index.html and a
    /prod/app/index.html )

    Would appreciate an answer to this specific question as well as any
    general feedback on best practice around setting up AngularFire production
    and test environments.

    Best,

    Jd
    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --
       Piotr Kaminski <piotr@ideanest.com>
       "That bun is dirty. Don't eat that bun."

    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/CANF_M5zf5Yq4ZkJKQoevxhCwc52SqEM5Y7-c%2B2Sz3pmW3fY%2BCw%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • David Langford at Aug 24, 2014 at 1:33 am
    I'm not using firebase hosting (though I could if I wanted).

    Which firebase instance to use is determined *before* *firebase deploy *is
    run.

    I've given a brief overview of my project setup below

    Note: In all these update YOURAPP with your apps name

    *How I set up my project (If I'm pushing to firebase hosting)*


        1. Create *YOURAPP-prod* instance in Firebase.
        2. Created my project using Yeoman Angular
        <https://github.com/yeoman/generator-angular> .
        3. Run *grunt build*. This will create a *dist *folder. This is what I
        what in firebase hosting
        4. Run *firebase init*
        5. Modify firebase.json
        <https://www.firebase.com/docs/hosting/guide/full-config.html>:
    *public *variable
        to *dist* instead of *app*
        6. Run *firebase deploy*. This should push what is in the *dist *folder
        to firebase (it will also be minified and all that good stuff).


    *How I set up different firebase instances for local and prod*


        1. Create *YOURAPP-dev *instance in Firebase.
        2. Export your data from *YOURAPP-prod* and import into *YOURAPP-dev*
        3. Install ng-constant <https://github.com/werk85/grunt-ng-constant> into
        your project
        4. Update my Gruntfile.js with the following* ***[1]*** *(see below)
        5. Update my Gruntfile.js task: Add *'ngconstant:development', *step to
        the *grunt serve* task (this is local development)
        6. Update my Gruntfile.js task: Add *'ngconstant:production', *step to
        the *grunt build *task (this is when pushing for prod).
        7. Update index.html: Add <script
        src="scripts/configGenerated.js"></script> so the browser loads the
        generated config file
        8. Update app.js: Add *'YOURAPPApp.configGenerated', *as a dependency to
        your main app module. (Same place where *ngRoute* and *ngResource* will
        be)
        9. Update any controllers argument with FBURL where you need the
        different firebase urls. For me this was in *service.firebase.js.*
        10. There is also a ENV variable that will say *development* or *production.
        *To test update your home page to show this variable
        11. In command line: run *grunt serve *this should start a server and
        load up your website. The home page should say *development*
        12. Stop the *grunt serve* process
        13. In command line: run *grunt build *then *firebase deploy*
        14. Your production website should say production (don't do this if you
        have actual customers on though)
        15. That should be it

    *Two things to note:*

        1. Your sign in users (e.g. simpleLogin) will not be synced across the
        two firebase instances
        2. If while *grunt serve *is running you also run *grunt build* your
        local website will be using production values (since it's config file was
        written over).



    Any dramas email back again.

    Cheers

    David


    ****[1]*** (*
         // So we can have different configs based on environment
         // This can be expanded later on to external config files
         ngconstant: {
           options: {
             name: 'YOURAPP.configGenerated',
             dest: '<%= yeoman.app %>/scripts/configGenerated.js',
             wrap: '\'use strict\';\n\n{%= __ngModule %}',
             space: ' '
           },
           development: {
             constants: {
               ENV: 'development',
               FBURL: 'https://YOURAPP-dev.firebaseio.com
    <https://yourapp-dev.firebaseio.com/>'
             }
           },
           production: {
             constants: {
               ENV: 'production',
               FBURL: 'https://YOURAPP-prod.firebaseio.com
    <https://yourapp-prod.firebaseio.com/>'
             }
           }
         }




    On Sun, Aug 24, 2014 at 6:36 AM, Joel Dietz wrote:

    How do you deploy? as far as I can tell from the docs "firebase deploy"
    does not take any additional arguments (i.e. firebase deploy --app YOURAPP1)


    On Fri, Aug 22, 2014 at 7:39 PM, David Langford wrote:

    Hey Joel

    The nodes you were referencing was in reply to my email about instance
    setups.

    I didn't use the nodes, it felt too dangerous to me.

    I set up another firebase instance and imported a copy of my data into
    that.

    I then used ngconstant <https://github.com/werk85/grunt-ng-constant> in
    my grunt file to of two config files depending on which environment I
    wanted. the config file just have the variable FBURL set to one of the
    instances.

    It is working pretty good for my so far.

    The only trouble I have run into is my simple login users is not synced
    across the two instances. So my test user has a different uid in the dev
    and prod instances. This caused a minor issue because I break up my data
    via the uid. But it hasn't been too bad so I haven't bothered to look into
    how to sync it better.


    ngconstant in my grunt file is set up as follows:

    // So we can have different configs based on environment
    // This can be expanded later on to external config files
    ngconstant: {
    options: {
    name: 'YOURAPP.configGenerated',
    dest: '<%= yeoman.app %>/scripts/configGenerated.js',
    wrap: '\'use strict\';\n\n{%= __ngModule %}',
    space: ' '
    },
    development: {
    constants: {
    ENV: 'development',
    FBURL: 'https://YOURAPP-dev.firebaseio.com'
    }
    },
    production: {
    constants: {
    ENV: 'production',
    FBURL: 'https://YOURAPP-prod.firebaseio.com'
    }
    }
    }


    If you think this will work well for you and you have any dramas I'm
    happy to help more.

    Cheers

    David

    On Saturday, August 23, 2014 3:25:53 AM UTC+10, Chris Raynor wrote:

    Hey Joel,

    I'm not quite sure of the specific references to nodes, but in this case
    I'd recommend setting up two new Firebases on the free hacker plan - say
    you had coolapp.firebaseapp.com, you could use that for production and
    have coolapp-dev.firebaseapp.com and coolapp-staging.firebaseapp.com.
    So long as the user you are using to deploy is at least a collaborator on
    all three Firebases, all you need do is edit the firebase.json in the
    project directory to point to the specific instance you want to deploy to.
    This also allows you to separate your testing data from your production data

    Hope that helps

    Chris
    Lead Engineer on Firebase Hosting
    On Thursday, August 21, 2014 3:13:34 PM UTC-7, Joel Dietz wrote:


    I've been experimenting with Firebase hosting and saw some references
    to setting up production and dev nodes.

    For our uses I'd ideally like to setup one dev instance, one staging
    instance, and one production instance.

    When it comes to "nodes," does this mean simply running them out of
    different directories? (i.e. a /dev/app/index.html and a
    /prod/app/index.html )

    Would appreciate an answer to this specific question as well as any
    general feedback on best practice around setting up AngularFire production
    and test environments.

    Best,

    Jd
    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.

    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to a topic in the
    Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/firebase-angular/qUBvGLNz4Ks/unsubscribe
    .
    To unsubscribe from this group and all its topics, send an email to
    firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --
    - David

    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/CAMRouG7_S%3DJps8r6p0KPi%2BVWCtDX5geUAH%2ByiaJ1hD19A3_9%2BA%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joel Dietz at Aug 24, 2014 at 5:47 am
    David,

       Do you have any public repos that illustrate this setup? I used the
    angularfire-seed to bootstrap my development and haven't been using grunt
    for anything so far.


       Best,

        Jd


    On Sat, Aug 23, 2014 at 6:33 PM, David Langford wrote:

    I'm not using firebase hosting (though I could if I wanted).

    Which firebase instance to use is determined *before* *firebase deploy *is
    run.

    I've given a brief overview of my project setup below

    Note: In all these update YOURAPP with your apps name

    *How I set up my project (If I'm pushing to firebase hosting)*


    1. Create *YOURAPP-prod* instance in Firebase.
    2. Created my project using Yeoman Angular
    <https://github.com/yeoman/generator-angular> .
    3. Run *grunt build*. This will create a *dist *folder. This is what I
    what in firebase hosting
    4. Run *firebase init*
    5. Modify firebase.json
    <https://www.firebase.com/docs/hosting/guide/full-config.html>: *public
    *variable to *dist* instead of *app*
    6. Run *firebase deploy*. This should push what is in the *dist *folder
    to firebase (it will also be minified and all that good stuff).


    *How I set up different firebase instances for local and prod*


    1. Create *YOURAPP-dev *instance in Firebase.
    2. Export your data from *YOURAPP-prod* and import into *YOURAPP-dev*
    3. Install ng-constant <https://github.com/werk85/grunt-ng-constant> into
    your project
    4. Update my Gruntfile.js with the following* ***[1]*** *(see below)
    5. Update my Gruntfile.js task: Add *'ngconstant:development', *step
    to the *grunt serve* task (this is local development)
    6. Update my Gruntfile.js task: Add *'ngconstant:production', *step to
    the *grunt build *task (this is when pushing for prod).
    7. Update index.html: Add <script
    src="scripts/configGenerated.js"></script> so the browser loads the
    generated config file
    8. Update app.js: Add *'YOURAPPApp.configGenerated', *as a dependency
    to your main app module. (Same place where *ngRoute* and *ngResource*
    will be)
    9. Update any controllers argument with FBURL where you need the
    different firebase urls. For me this was in *service.firebase.js.*
    10. There is also a ENV variable that will say *development* or *production.
    *To test update your home page to show this variable
    11. In command line: run *grunt serve *this should start a server and
    load up your website. The home page should say *development*
    12. Stop the *grunt serve* process
    13. In command line: run *grunt build *then *firebase deploy*
    14. Your production website should say production (don't do this if
    you have actual customers on though)
    15. That should be it

    *Two things to note:*

    1. Your sign in users (e.g. simpleLogin) will not be synced across the
    two firebase instances
    2. If while *grunt serve *is running you also run *grunt build* your
    local website will be using production values (since it's config file was
    written over).



    Any dramas email back again.

    Cheers

    David


    ****[1]*** (*
    // So we can have different configs based on environment
    // This can be expanded later on to external config files
    ngconstant: {
    options: {
    name: 'YOURAPP.configGenerated',
    dest: '<%= yeoman.app %>/scripts/configGenerated.js',
    wrap: '\'use strict\';\n\n{%= __ngModule %}',
    space: ' '
    },
    development: {
    constants: {
    ENV: 'development',
    FBURL: 'https://YOURAPP-dev.firebaseio.com
    <https://yourapp-dev.firebaseio.com/>'
    }
    },
    production: {
    constants: {
    ENV: 'production',
    FBURL: 'https://YOURAPP-prod.firebaseio.com
    <https://yourapp-prod.firebaseio.com/>'
    }
    }
    }




    On Sun, Aug 24, 2014 at 6:36 AM, Joel Dietz wrote:

    How do you deploy? as far as I can tell from the docs "firebase deploy"
    does not take any additional arguments (i.e. firebase deploy --app YOURAPP1)



    On Fri, Aug 22, 2014 at 7:39 PM, David Langford <langford.d@gmail.com>
    wrote:
    Hey Joel

    The nodes you were referencing was in reply to my email about instance
    setups.

    I didn't use the nodes, it felt too dangerous to me.

    I set up another firebase instance and imported a copy of my data into
    that.

    I then used ngconstant <https://github.com/werk85/grunt-ng-constant> in
    my grunt file to of two config files depending on which environment I
    wanted. the config file just have the variable FBURL set to one of the
    instances.

    It is working pretty good for my so far.

    The only trouble I have run into is my simple login users is not synced
    across the two instances. So my test user has a different uid in the dev
    and prod instances. This caused a minor issue because I break up my data
    via the uid. But it hasn't been too bad so I haven't bothered to look into
    how to sync it better.


    ngconstant in my grunt file is set up as follows:

    // So we can have different configs based on environment
    // This can be expanded later on to external config files
    ngconstant: {
    options: {
    name: 'YOURAPP.configGenerated',
    dest: '<%= yeoman.app %>/scripts/configGenerated.js',
    wrap: '\'use strict\';\n\n{%= __ngModule %}',
    space: ' '
    },
    development: {
    constants: {
    ENV: 'development',
    FBURL: 'https://YOURAPP-dev.firebaseio.com'
    }
    },
    production: {
    constants: {
    ENV: 'production',
    FBURL: 'https://YOURAPP-prod.firebaseio.com'
    }
    }
    }


    If you think this will work well for you and you have any dramas I'm
    happy to help more.

    Cheers

    David

    On Saturday, August 23, 2014 3:25:53 AM UTC+10, Chris Raynor wrote:

    Hey Joel,

    I'm not quite sure of the specific references to nodes, but in this
    case I'd recommend setting up two new Firebases on the free hacker plan -
    say you had coolapp.firebaseapp.com, you could use that for production
    and have coolapp-dev.firebaseapp.com and coolapp-staging.firebaseapp.
    com. So long as the user you are using to deploy is at least a
    collaborator on all three Firebases, all you need do is edit the
    firebase.json in the project directory to point to the specific instance
    you want to deploy to. This also allows you to separate your testing data
    from your production data

    Hope that helps

    Chris
    Lead Engineer on Firebase Hosting
    On Thursday, August 21, 2014 3:13:34 PM UTC-7, Joel Dietz wrote:


    I've been experimenting with Firebase hosting and saw some references
    to setting up production and dev nodes.

    For our uses I'd ideally like to setup one dev instance, one staging
    instance, and one production instance.

    When it comes to "nodes," does this mean simply running them out of
    different directories? (i.e. a /dev/app/index.html and a
    /prod/app/index.html )

    Would appreciate an answer to this specific question as well as any
    general feedback on best practice around setting up AngularFire production
    and test environments.

    Best,

    Jd
    --
    You received this message because you are subscribed to the Google
    Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to firebase-angular+unsubscribe@googlegroups.com.

    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/3ada872d-9262-4a61-9cb5-d87ec0c80896%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to a topic in the
    Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/firebase-angular/qUBvGLNz4Ks/unsubscribe
    .
    To unsubscribe from this group and all its topics, send an email to
    firebase-angular+unsubscribe@googlegroups.com.

    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3jY5uz6E9Hk-0jHWVQfX5fkiBAxuvFBJzZANJWWpXg%3DNg%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --
    - David

    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/CAMRouG7_S%3DJps8r6p0KPi%2BVWCtDX5geUAH%2ByiaJ1hD19A3_9%2BA%40mail.gmail.com
    <https://groups.google.com/d/msgid/firebase-angular/CAMRouG7_S%3DJps8r6p0KPi%2BVWCtDX5geUAH%2ByiaJ1hD19A3_9%2BA%40mail.gmail.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.


    --


    swarm
    joel dietz
    @fractastical
    swarm.co

    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/CA%2B_jL3izU7AczdP%3DAnrCvCjNJ5b86wpmcwK8d-LYctC_%3D1yDrg%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupfirebase-angular @
postedAug 21, '14 at 10:26p
activeAug 24, '14 at 7:21a
posts13
users5

People

Translate

site design / logo © 2021 Grokbase