Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the scripts for the database.js and server.js in the contribution guide along with reference images #142

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 36 additions & 5 deletions Contribution-guide.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@


Welcome contributors, this is the official site of the Training-Placement-Cell.
Below is the setup-guide for this project.
This is the setup-guide for this project.


## Backend-setup

1. Navigate to : *backend/config/database.js*
and apply these changes

```
connection: {
host: env('DATABASE_HOST', 'localhost'),

port: env.int('DATABASE_PORT', 5432),

database: env('DATABASE_NAME', 'tnp-test'),

user: env('DATABASE_USERNAME', 'postgres'),

password: env('DATABASE_PASSWORD', '2006001'),

schema: env('DATABASE_SCHEMA', 'public'),

}
```


2. Navigate to : *backend/config/server.js*
and apply these changes
```
host: env('HOST', 'localhost'),
```

3. To run backend:
```
Expand All @@ -21,6 +44,16 @@ Below is the setup-guide for this project.

1. Navigate to: *frontend/config/index.js*
and apply these changes
```
export const API_URL =

process.env.NEXT_PUBLIC_API_URL || "http://localhost:1337"

export const NEXT_URL =

process.env.NEXT_PUBLIC_FRONTEND_URL || 'http:localhost:3000'
```


2. To run frontend:
```
Expand All @@ -32,7 +65,7 @@ Below is the setup-guide for this project.

1. Firstly, you have to signup to the strapi,

2. Navigate to: *Settings/Roles*: it should look like this,
2. Navigate to: *Settings/Roles*: it will look like [this](https://i.imgur.com/9hAhJyI.png)

3. Now for [roles and permissions configuration](https://docs.google.com/document/d/1D64h39SjRC3-Fcw2RU-U49l82BDDOIVuUudIiUJ9YNk/edit?usp=sharing):

Expand All @@ -54,7 +87,6 @@ const Lottie = dynamic(()=>import("lottie-react"),{ssr:false})
```

- **Never commit these changes this is only to remove the development error, it is not an error at the production**
- ****

## Do's and Don'ts
- Always remove the console.logs which you have created while developing any feature or fixing bugs.
Expand All @@ -63,7 +95,6 @@ const Lottie = dynamic(()=>import("lottie-react"),{ssr:false})
- Make a new branch for every new bug fixing or feature.
- Your local master || main branch should always be updated with the remote's main branch
- Never make a pull request in the master branch, use test branch for it.
- Pull request must have a detailed description about its intent you can find a template at **pull_request_template.md**.
- Pull request must have a detailed description about its intent, you can check the pull request template in **pull_request_template.md**.
- The commits' messages and pull requests titles must be clear about the purpose they serve.
- Watch the official repository so you will be informed about every actions there.

Loading