Git Product home page Git Product logo

community's Introduction

Schedule

    10/10 DB, Basic HTML

Diary

10/10

  • check how to connect to Postgres on node.js with heroku https://node-postgres.com/features/connecting

  • difference between client and Pool https://stackoverflow.com/questions/48751505/how-can-i-choose-between-client-or-pool-for-node-postgres

  • learn basic syntax of postgres * syntax \q | Exit psql connection \c | Connect to a new database \dt | List all tables \du | List all roles \list | List databases

      * stop using superuser and create user me
      ```bash
      postgres=# CREATE ROLE me WITH LOGIN PASSWORD 'password';
      postgres=# ALTER ROLE me CREATEDB;
      postgres= \du
              me          | Create DB                           | {}
              postgres    | Superuser, Create role, Create DB   | {}
      ```
      * use 'me' user
      ```bash
      psql -d postgres -U me
      ```
      https://blog.logrocket.com/setting-up-a-restful-api-with-node-js-and-postgresql-d96d6fc892d8/
    

10/12

10/17

10/18

  • handles environment variables How to use custom environment variables in Node Create an .env file. The file should be placed in the root of your project Install the dotenv library: npm install dotenv. Require dotenv as early as possible (e.g. in app.js): require('dotenv').config({path: __dirname + '/.env'}). Wherever you need to use environment variables (e.g. in GitLab, in Jenkins, in Heroku, …) you need to add your environment variables. The way depends on the platform but it is usually easy to do. Optional: create a function which runs at startup of your server. It should check whether all the required environment variables are set and throw an error otherwise. from https://itnext.io/how-to-use-environment-variables-in-node-js-cb2ef0e9574a

  • drop marker to google map https://gist.github.com/SamSamskies/6033264

10/19

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.