-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
1 parent
db03f21
commit 49f07a3
Showing
1 changed file
with
32 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,32 @@ | ||
How to Fetch template from the private repository. In order to test the generator whether it fetch the template from the private repository or not, we will create a private repository in local and publish a template in the private repository. | ||
|
||
**Step 1:** Settuping Private Repository in Local: | ||
|
||
Installing [verdaccio](https://verdaccio.org/) using below command: | ||
|
||
`npm -i -g verdaccio` | ||
|
||
|
||
**Step 2:** Starting verdaccio locally and creating a new user: | ||
|
||
![Screenshot 2023-12-20 at 3.18.28 PM](https://hackmd.io/_uploads/H1gouVgwa.png) | ||
|
||
**Step 3:** Login in localhost:4873 | ||
|
||
![Screenshot 2023-12-20 at 3.23.17 PM](https://hackmd.io/_uploads/r1votVlDp.png) | ||
|
||
|
||
**Step 4:** Publishing a template to the private repository using below command: | ||
|
||
``` | ||
npm publish --registry </templateName> | ||
``` | ||
|
||
**Step 5:** Fetching the template from the generator using an example. | ||
|
||
```javascript | ||
const Generator = require('../lib/generator'); | ||
const gen = new Generator('@asyncapi/nodejs-template','asycnapi.yml', __dirname, {debug: true, registry: {url: 'http://localhost:4873/', username: 'aayush', password: '123'}}); | ||
gen.installTemplate() | ||
``` | ||
You will get complete template information |