Skip to content

Commit ae48d04

Browse files
committed
docs: added instruction for running sample app, fixes #2
1 parent 6143b7a commit ae48d04

File tree

11 files changed

+21
-62302
lines changed

11 files changed

+21
-62302
lines changed

DEVELOPING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,24 @@ Use
6060
npm run test
6161
```
6262
from the `sdk` folder to start testing.
63+
64+
### Running Sample Apps
65+
66+
Every sample app requires a different version of Angular CLI. Please refer to individual sample app `Readme.md` for details.
67+
Before sample apps can be used, `imagekitio-angular` library needs to be packed and installed using file system within the sample apps. Use the following steps to run any sample app.
68+
69+
1. In the `sdk` folder, install dependencies with `npm install`
70+
2. Build library with `npm run build`
71+
3. In the `sdk/dist/imagekitio-angular` folder, use `npm pack` to create a tarball with version mentioned in the current package.json for sdk.
72+
4. Go to `samples/imagekitio-angular<x>-sample` folder and use `npm install` to install dependencies.
73+
5. Use `npm install ../../sdk/dist/imagekitio-angular/imagekitio-angular-x.x.x.tgz` where x.x.x needs to be replaced with current version. For example, sdk version is `0.0.1`, then above command becomes `npm install ../../sdk/dist/imagekitio-angular/imagekitio-angular-0.0.1.tgz`
74+
6. Configure sample app with required keys. Use each app's `Readme.md` for exact details.
75+
7. Use npm start from the `samples/imagekitio-angular<x>-sample` folder to run app for particular angular version.
76+
77+
### Running Sample Server
78+
79+
Sample server for upload implementation is available at `samples/sample-server`. To run the server, follow these steps
80+
81+
1. Create a `.env` file based on `sample.env` and enter your private key.
82+
2. Use `npm install` to install dependencies.
83+
3. Use `npm run server` to start the server.

0 commit comments

Comments
 (0)