GithubHelp home page GithubHelp logo

gatraenggar / dicoding-forum-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 105 KB

Forum-like application on Rest API using Hapi.js. A project submission for Dicoding's Becoming Backend Expert module.

JavaScript 99.82% Shell 0.18%
automation-testing clean-architechture

dicoding-forum-api's Introduction

Dicoding-Forum-API

What is this ?

A forum-like application on Rest API using Hapi.js. This app provides an interface for users to have an authentication with their account, post a thread like Twitter, and let anybody to comment & reply the thread. It is defined as the completion criteria of project submission for Dicoding's Becoming Backend Expert module.

This project is an implementation of the topics being taught in the learning module. The module covers about automation-testing, clean architecture, CI/CD using GitHub Action & AWS, security (eg. SQL injection, DDoS attack, Man in The Middle), and server scalability.

How to test this in local environment ?

Installation

1. git clone https://github.com/gatraenggar/dicoding-forum-api.git

2. cd dicoding-forum-api

3. npm install to install the all dependencies needed

Configuration

4. Create two PostgreSQL databases for production & testing

5. Rename test_example.json to test.json. Then change the db_user, db_password, & db_name (for testing database only) value in that test.json file based on yours

6. Rename example.env to .env. Then change the db_user, db_password, & db_name value in that .env file based on yours

6.1. Change access_token_key and refresh_token_key in .env file with your generated encryption keys

You can generate your own encryption keys with following steps:

  1. Enter this site https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx
  2. Choose Encryption key
  3. Check the Hex ? field
  4. Click the 512-bit option
  5. Click Get new results button, then copy the generated string to the config file

Run the App

7. npm run migrate:test up to migrate/create the database table

8. npm run test:watch to run the test

dicoding-forum-api's People

Contributors

gatraenggar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.