What is the best approach for deploying a sails.js application?

I am developing a web application using sails.js as the source. The application will be used by different schools, and my first approach is to deploy a copy of the application for each school.

Example:

school1.application.com having an instance of the sailing application at school.application.com:8080 school2.application.com having an instance of the sailing application at school.application.com:8081

Each instance has a Bitbucket repository (or branch), and the source is updated using Git.

For maintenance purposes, I was thinking of using the control panel associated with the entire Git repository and managing all clicks from there.

On the other hand, only one instance for the entire school can be more manageable, but how can I use a separate database for each of them? Using one database is not too risky when it has about 20 schools?

Using the second approach, if the application does not work, all schools will be affected, unlike the first.

I hope I explained my explanation.

Thank you for your understanding.

+4
source share
1 answer

Where will the sail application be located? You? e.g. Nodejitsu, Amazon, etc. Or will the application be deployed to the school server?

  • An approach
  • : , . . :.

    // Student.js model
    
      module.exports = {
    
        attributes: {
    
          name : { type: 'string' },
    
          lastname : {
              type : 'string'
          },
    
         // School which the student belongs
         school : {
           model : 'school'
         }
    

api, , URL- . mongo SQL, Waterline db, . : https://github.com/balderdashy/waterline-docs/blob/master/associations.md

  • : , , , , db ALTER ( , ).

  • : ( , ) config/connections.js . , , , , 20 .

1- .

+1

All Articles