-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
odezig
authored and
odezig
committed
Mar 2, 2024
0 parents
commit a734bbf
Showing
38 changed files
with
7,185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
NODE_ENV=development | ||
PORT=4000 | ||
VERSION_API=/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Dependency directories | ||
node_modules/ | ||
node_modules/.cache/mongodb-memory-server/mongod-arm64-darwin-6.0.9 | ||
|
||
# Environment configuration files | ||
.env | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Boo World Comment/Vote API | ||
|
||
This API provides services for a Boo World comment/voting with options. | ||
|
||
## Requirements | ||
|
||
To run this project, you will need: | ||
|
||
- Node.js v20.10.0 | ||
- MongoDB Memory Server v9.1.6 | ||
- dotenv v16.4.5 | ||
- Jest v29.7.0 | ||
- Nodemon v3.1.0 | ||
- Supertest v6.3.4 | ||
|
||
Ensure you have these dependencies installed before attempting to run the project. | ||
|
||
## Installation | ||
|
||
1. Clone the repository to your local directory: | ||
|
||
```bash | ||
git clone https://github.com/arislaode/boo-world.git | ||
``` | ||
|
||
2. Enter the project directory: | ||
|
||
```bash | ||
cd boo-world | ||
``` | ||
|
||
3. Install dependencies using npm: | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
4. Copy the .env_example file to a new file named .env and configure the environment variables as follows: | ||
|
||
```plaintext | ||
NODE_ENV=development | ||
PORT=4000 | ||
VERSION_API=/v1 | ||
``` | ||
|
||
5. Start the development server: | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
## Usage | ||
|
||
### Personality Types (MBTI) | ||
|
||
- **POST** `/mbti`: Create a new MBTI type. | ||
- **GET** `/mbti`: Retrieve all MBTI data. | ||
- **PUT** `/mbti/{id}`: Update an existing MBTI type. | ||
- **DELETE** `/mbti/{id}`: Delete an MBTI type. | ||
|
||
### Enneagram Types | ||
|
||
- **POST** `/enneagram`: Create a new Enneagram type. | ||
- **GET** `/enneagram`: Retrieve all Enneagram types. | ||
- **PUT** `/enneagram/{id}`: Update an existing Enneagram type. | ||
- **DELETE** `/enneagram/{id}`: Delete an Enneagram type. | ||
|
||
### Zodiac Signs | ||
|
||
- **POST** `/zodiac`: Create a new Zodiac sign. | ||
- **GET** `/zodiac`: Retrieve all Zodiac signs. | ||
- **PUT** `/zodiac/{id}`: Update an existing Zodiac sign. | ||
- **DELETE** `/zodiac/{id}`: Delete a Zodiac sign. | ||
|
||
### User Profiles | ||
|
||
- **POST** `/profiles`: Create a new profile. | ||
- **GET** `/profiles/{id}`: Retrieve a profile by ID. | ||
|
||
### Comments | ||
|
||
- **POST** `/comments`: Create a new comment. | ||
- **GET** `/comments`: Retrieve all comments. | ||
- **PATCH** `/comments/{id}/like`: Like a comment. | ||
|
||
## Testing | ||
|
||
To run the tests, you can use the following command: | ||
|
||
```bash | ||
npm run test | ||
``` |
Oops, something went wrong.