Please make sure you have the following programs installed:
- node (version 14 or higher): JavaScript runtime
- npm: node package manager
- yarn: a better package manager
To install node
and npm
:
- under fedora:
sudo dnf install nodejs
. - under ubuntu:
sudo apt install nodejs npm
.
To install yarn
: npm install --global yarn
You will need a Github repository to use Netlify 📂
- Create a Github repository (named:
Serverless-Gifs-App
for example) and clone it withgit clone
- Download the files
- Run the following commands:
mv Netlify-App/* Netlify-App/.* [YOUR REPO NAME]
cd [YOUR REPO NAME]
# Install the dependencies
yarn install
# To start a server
yarn start
-
To check if everything is good, go to http://localhost:3000
-
Shut down the server (Ctrl + C)
To finish this part, we're gonna push everything on github 📌
- Commit and push
- Go to Netlify website and create an account (signup using github) if you haven't already one
- Go to Giphy website
- Click the
Create an App
button - Create an account
- You should get a private key on your dashboard
- Take care of it, you will need it later !
- Install serverless framework with
npm install -g serverless
- Download the files
- Run the following commands:
unzip Serverless-API.zip
cd Serverless-API
# Install the dependencies
yarn install
# Now we gonna verify that the api is working
yarn test
# You should the get all the tests successful (in green)