Generasi Gigih Social Media Backend Project
Developing a social media application which can be used to share information with other people. This application will only be used by people that work in a certain company so we cannot use existing public social media. Using Sinatra
- Fork and clone repo to your local machine
- Use
bundle install
to install dependencies or Usebundle install --path vendor/bundle
- Create
.env
file based on.env.example
source .env
file- Create folder
public/files
runmkdir public
andmkdir files
insidepublic
- Run with
ruby main.rb
orrackup -p 4567
rubocop -a
or rubocop --auto-correct-all
There are 4 commit type :
[TEST]
: This shows test commit[FEATURE]
: This shows feature is developed first rather than test first[DEPENDENCIES]
: This shows adding dependencies such as Collection , Schema or etc..[HELPERS]
: This shows helper class is developed
- run
rspec -f d
should run all test
- run
sh ./lib/setup.sh
- run
docker ps
to make sure your app running locally - run
docker exec -it YOURCONTAINERID bash
- Create folder
public/files
mkdir public
andmkdir files
insidepublic
- Access your app through
localhost:4567/
- run
docker-compose run app sinatra new . --force --database=mysql --skip-bundle
- run
sh ./lib/mysql-docker.sh
- run
docker-compose build
- run
docker-compose up
- run
docker exec -it YOUCONTAINERID bash
- Create folder
public/files
mkdir public
andmkdir files
insidepublic
- access your app through
localhost:4567/
For this project, Postman Collection was used to test the API Endpoint
You can access here the production on Production Link