Skip to content

lishenyu16/express-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Express Web Server with PostgreSQL and JWT Authentication

Server source code for http://shenyu16.com
Node + Express + PostgreSQL

Table of Contents

Features already implemented

  • Login, Register, Email Confirmation
  • Cookie for JWT
  • Timeline
  • Visitors tracking with ip, location..

Requirements

  • Node.js (version 20.3.1)
  • PostgreSQL
  • npm (version 9.6.7) or
  • yarn (version 1.22.19)
  • send grid account with an api key
  • ipinfo account with a key

Installation

  1. Clone the repository:

    git clone git@github.com:lishenyu16/express-server.git
    cd express-server
  2. Install dependencies

    yarn install
    npm install
  3. install a local database with pgadmin or clound db like elephantSql or aws RDS

.env file

A sample .env would be like below:

PORT=[your port number]
NODE_ENV="production"
DATABASE_URL=[a string to connecto the db, containing the username, host and port...
SENDGRID_API_KEY=[sendGrid api key]
TOKEN_SERECT=[your own secret string]
IPINFO_TOKEN=[your ipinfo token

Usage

  1. Start the server:
  yarn start
  1. The server will be running at localhost:[your port] by default.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published