- Github Create Repo is a small website made using NestJS in the backend and basic HTML CSS in the frontend.
- It allows anyone to authorize their github account and the code will create a sample repo with some files in their account.
- On clicking on
Create Repo
button, it will take the user to their Github account where they can grant permissions to their account. - After authorisation is complete, it will create a repo named
sample-code
in the user’s account with some sample code.
Demo Video {YouTube Unlisted Video}
- Install Node.js from here.
- Click on
New OAuth App
button to create a Github App from here - Provide
Application name
of your choice - Add
http://localhost:3000/
asHomepage URL
andhttp://localhost:3000/github/callback
asAuthorization callback URL
- Click on
Register Application
to complete the creation process. - Then copy the
Client ID
andgenerate a new client secret
and save them somwhere for future use.
- Open Terminal and run the following code to clone the repository
git clone https://github.com/anubhutigupta2409/github-create-repo.git
- Change directory (cd) into the project directory and run the following command to install all the dependencies
npm install
- Inside the project directory create a
.env
file with the following contents
GITHUB_CLIENT_ID= *paste your client id*
GITHUB_CLIENT_SECRET= *paste your client secret*
GITHUB_SCOPES= repo
- You can also edit the
templateRepo.json
file to change the template repo from which the new repo is created
In the project directory, you can run:
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser