hunk.code_window: ## Creating a new connection from the configuration file
   Most of the times you want to store your connection options in a separate configuration file.
   It makes it convenient and easy to manage. 
   TypeORM supports multiple configuration sources.
   You only need to create a `ormconfig.[format]` file in the root directory of your application (near `package.json`),
   put your configuration there and in your app call `createConnection()` without any configuration passed:
  
hunk.labels: keep keep keep keep replace keep keep keep
hunk.after_edit: It makes it convenient and easy to manage.
  
hunk.file_path: docs/using-ormconfig.md
hunk.type: replace
file: import "reflect-metadata";
  import {ConnectionOptions, createConnection} from "../../src/index";
  import {Post} from "./entity/Post";
  
  const options: ConnectionOptions = {
      type: "mysql",
      host: "localhost",
      port: 3306,
      username: "root",
      password: "admin",
      database: "test",
      logging: ["query", "error"],
      synchronize: true,
      entities: [Post]
  };
  
  createConnection(options).then(connection => {
  
      let post = new Post();
      post.text = "Hello how are you?";
      post.title = "hello";
  
      let postRepository = connection.getRepository(Post);
      
      postRepository
          .save(post)
          .then(post => {
              console.log(`Post has been saved: `, post);
              console.log(`Post's version is ${post.version}. Lets change post's text and update it:`);
              post.title = "updating title";
              return postRepository.save(post);
              
          }).then(post => {
              console.log(`Post has been updated. Post's version is ${post.version}`);
          });
  
  }, error => console.log("Cannot connect: ", error));
  