Small full stack app backend is done with Node Express and front end is done with react.
This app is fetching data on the backend from an API when button is clicked, once the data is fetched, if record is unique, it gets stored in local db.
Use the node package manager to install install all the dependencies.
npm install
Add your API Key in .envSample and then rename that file into (.env). You can get your API key from below link after your sign up:
http://www.omdbapi.com/apikey.aspx
make sure your .env file has the following variables:
KEY = YOUR_API_KEY_HERE TEST = postgresql:///YOURDBTEST DEV = postgresql:///YOURDB URL=http://www.omdbapi.com/?
node server.js
Tests are written using Jest and SuperTest, to run tests:
jest
or
npm run test
Use the node package manager to install install all the dependencies.
npm install
npm start
Tests are written using React Testing Library,to run tests:
npm run test