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 {Category} from "./entity/Category";
  
  const options: ConnectionOptions = {
      type: "mysql",
      host: "localhost",
      port: 3306,
      username: "root",
      password: "admin",
      database: "test",
      synchronize: true,
      entities: [__dirname + "/entity/*"]
  };
  
  createConnection(options).then(connection => {
      let categoryRepository = connection.getRepository(Category);
      
      let category1 = new Category();
      category1.name = "category #1";
      
      let mainCategory = new Category();
      mainCategory.name = "main category";
      mainCategory.oneCategory = category1;
      mainCategory.manyCategories.push(category1);
      mainCategory.oneManyCategory = category1;
  
      categoryRepository.save(mainCategory)
          .then(savedCategory => {
              console.log("saved category: ", savedCategory);
          })
          .catch(error => console.log("Cannot save. Error: ", error.stack ? error.stack : error));
  
  }, error => console.log("Cannot connect: ", error.stack ? error.stack : error));
  