Giter Club home page Giter Club logo

knex_crud_api's Introduction

knex_crud_api

Resource

Log

  • 20170730: Add CORS support

    Please refer to this page for more details

  • 20170730: Create heroku application

    1. Create heroku app with heroku-cli
    E:\nodejs\knex_crud_api>heroku create knex-crud-api
    Creating knex-crud-api... done
    https://knex-crud-api.herokuapp.com/ | https://git.heroku.com/knex-crud-api.git
    
    1. heroku addons create: postgresql
    E:\nodejs\knex_crud_api>heroku addons:create heroku-postgresql
    Creating heroku-postgresql on knex-crud-api... free`
    Database has been created and is available`
     ! This database is empty. If upgrading, you can transfer`
     ! data from another database with pg:copy`
    Created postgresql-round-39560 as DATABASE_URL`
    Use heroku addons:docs heroku-postgresql to view documentation
    
    1. connect to DB
    E:\nodejs\knex_crud_api>heroku pg:psql
    --> Connecting to postgresql-round-39560
    psql (9.6.2, 服务器 9.6.1)
    SSL 连接(协议:TLSv1.2,密码:ECDHE-RSA-AES256-GCM-SHA384,密钥位:256,压缩:关闭)
    输入 "help" 来获取帮助信息.
    
    knex-crud-api::DATABASE=> \dt
    找不到关联。
    knex-crud-api::DATABASE=> \q
    
    1. open heroku application
    > heroku open
    
    1. open heroku logs and keep watching
    >heroku logs -t
    
    1. execute db migration
    >heroku run knex migrate:latest
    
    1. check db connection again
      E:\nodejs\knex_crud_api>heroku pg:psql
    --> Connecting to postgresql-round-39560
    psql (9.6.2, 服务器 9.6.1)
    SSL 连接(协议:TLSv1.2,密码:ECDHE-RSA-AES256-GCM-SHA384,密钥位:256,压缩:关闭)
    输入 "help" 来获取帮助信息.
    
    knex-crud-api::DATABASE-> \dt
                             关联列表
     架构模式 |         名称         |  类型  |     拥有者
    ----------+----------------------+--------+----------------
     public   | knex_migrations      | 数据表 | jjshdfpxgxslno
     public   | knex_migrations_lock | 数据表 | jjshdfpxgxslno
     public   | sticker              | 数据表 | jjshdfpxgxslno
    (3 行记录)
    
    1. seed
    >heroku run knex seed:run
    
  • Execute migration

    > knex migrate:latest
    

knex_crud_api's People

Contributors

yunzhiwei avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.