Skip to content

SergioPSV/NodeAppWithDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js app with PostgreSQL

Node.js app use redis and search in PostgreSQL DB

For this app you must have Node.js, redis-server and directory with app

  • for Node.js go to the Node.js site and install
  • install redis using brew install redis on MacOS or use npm install redis
  • start server brew services start redis or run manually using redis-server /usr/local/etc/redis.conf

I use /usr/local/bin/redis-server for run server and connects to localhost on port 6379

image

Starting app

  • Clone this app using git clone or download zip
  • Change to the project directory and run node app.js
  • If everythink is ok the terminal will display
    • Server listening on port: 3000

Testing app

redis-server and app.js are working

work only GET requests

  • Use endpoint /film/:title where :title - name of the film
  • For example run localhost:3000/film/Fargo_Gandhi
    • It is from database

image

  • From cache

image

About

Node.js app use redis and search in PostgreSQL DB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published