Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaay7/placementsbackend
Managing the placements information through this application
https://github.com/jaay7/placementsbackend
aws-ec2 django docker-compose graphene-django graphql jwt mongodb python
Last synced: about 19 hours ago
JSON representation
Managing the placements information through this application
- Host: GitHub
- URL: https://github.com/jaay7/placementsbackend
- Owner: Jaay7
- Created: 2022-04-01T17:30:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-28T07:26:17.000Z (over 1 year ago)
- Last Synced: 2024-04-24T11:04:00.139Z (7 months ago)
- Topics: aws-ec2, django, docker-compose, graphene-django, graphql, jwt, mongodb, python
- Language: Python
- Homepage: https://placements-apis.onrender.com/graphql/
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![CI/CD Docker - Django](https://github.com/Jaay7/placementsbackend/actions/workflows/main.yml/badge.svg)](https://github.com/Jaay7/placementsbackend/actions/workflows/main.yml)
# Placements Backend
Created using Django, GraphQL, and using MongoDB as database.
## Accessing the application
#### 1. Clone the application.
#### 2. In the root directory create a virtual environment.
```sh
pip install virtualenv
```
```sh
python -m venv venv
```#### 3. Now install the packages required for our project which are available in requirements.txt
```sh
pip install -r requirements.txt
```#### 4. Create a .env file
Naviagte to the placementsbackend folder where settings.py is availableCreate a .env file
```
MONGODB_URI=
```#### 5. To run the application
```sh
python manage.py makemigrations
``````sh
python manage.py migrate
``````sh
python manage.py runserver
```#### 6. Testing the application
Open postman application to test our endpoint
http://127.0.0.1:8080/graphql/
Make sure your request is set to POST method.
- Register new user
```
mutation {
registerUser(
email: "",
username: "",
password: "",
fullName: "
) {
user {
id
username
fullName
}
token
}
}
```- Login user
```
mutation {
login(
username: "",
password: ""
) {
token
payload
}
}
```- Getting the loggedIn user based on token.
In the headers tab give:
KEY as AuthorizationVALUES as JWT
Make sure there is space between JWT and token
```
query me {
me {
id
username
fullName
}
}
```