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: 3 months 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 (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-28T07:26:17.000Z (about 3 years ago)
- Last Synced: 2025-06-30T08:08:38.916Z (12 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
[](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 available
Create 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
email
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 Authorization
VALUES as JWT
Make sure there is space between JWT and token
```
query me {
me {
id
email
username
fullName
}
}
```