Skip to content

savinnsk/IN8_DEVENOLOGY_recruiting_selection_crawler-tech-blogs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7f9b5bd · Jan 13, 2023
Sep 20, 2022
Nov 12, 2022
Sep 7, 2022
Sep 19, 2022
Sep 2, 2022
Jan 13, 2023
Sep 19, 2022
Sep 2, 2022
Sep 7, 2022
Oct 15, 2022
Sep 7, 2022
Oct 15, 2022
Nov 12, 2022
Oct 12, 2022
Oct 15, 2022

Repository files navigation

Crawler Your Favorite TechBlogs Websites

The site is down for a moment due to costs to keep in AWS CLOULD

description: This aplication can get all headlines, paragraphs, links from othes blogs techs, now is only working in https://devgo.com.br

Run in Insomnia}

status : (developing)

technologies used

  • The Aplication is hosted at AWS CLOUD ubunto 20.04 instance
  • The Data Base postgres is running in a docker instance
  • The Application has a certificate https from certbot
  • The applicaiton has continious integration and continuous delivery CI/CD

How to Download and Run the project

💻 Getting started

Import the Insomnia.json on Insomnia App or click on Run in Insomnia button.

Requirements

Clone the project and access the folder

git clone https://github.com/savinnsk/fav-blog-links.git && cd fav-blog-links

Follow the steps below

# Install the dependencies

$ yarn

# Make a copy of '.env.example' to '.env'
# and set with YOUR environment variables.

$ mv .env.exemple .env

$ SHOULD HAVE A DATABASE CALLED api-fav-blogs

# Once the services are running, run the migrations
$ yarn typeorm migration:run -d src/shared/infra/typeorm/data-source.ts



# Start all the services and the application with Docker Compose
$ sudo docker-compose up -d



# Well done, project is started!

example env variables..

#ORM AND DATABASE

ORM_USERNAME=postgres
ORM_HOST=localhost
ORM_PASSWORD=admin
ORM_DATABASE=api-fav-blogs


#AUTHENTICATE JWT

USER_SECRET_TOKEN=batata

To run test

yarn test

USER ENDPOINTS

Create a new user

endpoint: http://localhost:5000/users/create

method: POST

request body

- properties : {

    - name : string 
    - password : string
    - email: string     
}

Authentication user

endpoint: http://localhost:5000/sessions

method: POST

request body

- properties : {
    
    - name : string 
    - password : string     
}

Bookmarks endpoint

Create a new bookmark

endpoint: http://localhost:5000/bookmarks/create

method: POST

Authentication required

request headers

- token

    -type : jsonwebtoken 

request body

    - properties {

         - label : string 
         - link : string   
    }     

Delete a bookmark

endpoint: https://deploy.savinnsk.com/bookmarks/delete/{id}

method: DELETE

request params

- user_id
- bookmark_id

Response 201

{ render to page create a bookmark
}

Edit a bookmark

endpoint: http://localhost:5000/bookmarks/edit/{id}

method: PUT

Authentication required

request headers

- token

    -type : jsonwebtoken 

request params

- id

request body

    - properties {

         - label : string 
         - link : string   
    }     

##Get All bookmarks

endpoint: https://deploy.savinnsk.com/bookmarks/list/user_id

method: GET

request params

user_id

  -type : string   

Response 200

Array bookmarks

  -type : Object[bookmarks]

Developed for: Savio Picanço Do Espirito Santo Brito

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.