Skip to content

Commit 519ba53

Browse files
committed
sample app updated
1 parent b24f61b commit 519ba53

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

samples/sample-app/server/server.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const fs = require('fs');
77
const path = require('path');
88

99
const pugTemplatePath = path.join(__dirname, "../views/index.pug");
10-
10+
const js = fs.readFileSync(path.join(__dirname, "../../../dist/imagekit.umd.js"));
1111

1212
const app = express();
1313
app.use(cors());
@@ -50,8 +50,6 @@ const startServer = (port = 3000, PUBLIC_KEY, PRIVATE_KEY, URL_ENDPOINT) => {
5050

5151
router.get("/imagekit.js", (req, res) => {
5252
try {
53-
//const html = fs.readFileSync(path.join(__dirname, "../views/index.html"));
54-
var js = fs.readFileSync(path.join(__dirname, "../../../dist/imagekit.umd.js"));
5553
res.set('Content-Type', 'text/javascript');
5654
res.send(Buffer.from(js));
5755
} catch (err) {

samples/sample-app/views/index.pug

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,6 @@ html
2828
});
2929

3030
window.imagekit = imagekit;
31-
debugger;
32-
var imageURL = imagekit.url({
33-
path : "/default-image.jpg",
34-
urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/endpoint/",
35-
transformation : [{
36-
"height" : "300",
37-
"width" : "400"
38-
}]
39-
});
40-
41-
console.log(imageURL);
4231

4332
function upload(e) {
4433
e.preventDefault();
@@ -57,7 +46,6 @@ html
5746
statusEl.innerHTML = "File Uploaded";
5847
var sampleTransformations = [{ HEIGHT: 300, WIDTH: 400}];
5948
srcUrl = result.url;
60-
debugger;
6149
transformedURL = imagekit.url({
6250
src: srcUrl,
6351
transformation : sampleTransformations

0 commit comments

Comments
 (0)