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

Rename docker examples to TypeScript #342

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion examples/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ services:

networks:
resque_network:
driver: overlay
4 changes: 2 additions & 2 deletions examples/docker/producer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /node-resque

RUN apk add --update nodejs nodejs-npm
COPY package.json .
COPY producer.js .
COPY producer.ts .
RUN npm install

CMD ["node", "producer.js"]
CMD ["node", "-r", "ts-node/register", "producer.ts"]
5 changes: 5 additions & 0 deletions examples/docker/producer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@
},
"dependencies": {
"node-resque": "latest"
},
"devDependencies": {
"@types/node": "latest",
"ts-node": "latest",
"typescript": "latest"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Queue } from "../../../src";
/* In your projects:
import { Queue } from require("node-resque");
import { Queue } from "node-resque";
*/

let queue;

async function boot() {
Expand Down Expand Up @@ -51,6 +50,7 @@ process.on("uncaughtException", (error) => {
});

process.on("unhandledRejection", (rejection) => {
// @ts-ignore
console.error(rejection.stack);
process.nextTick(() => process.exit(1));
});
Expand Down
4 changes: 2 additions & 2 deletions examples/docker/worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /node-resque

RUN apk add --update nodejs nodejs-npm
COPY package.json .
COPY worker.js .
COPY worker.ts .
RUN npm install

CMD ["node", "worker.js"]
CMD ["node", "-r", "ts-node/register", "worker.ts"]
5 changes: 5 additions & 0 deletions examples/docker/worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@
},
"dependencies": {
"node-resque": "latest"
},
"devDependencies": {
"@types/node": "latest",
"ts-node": "latest",
"typescript": "latest"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Worker, Scheduler } from "../../../src";
/* In your projects:
const { Worker, Scheduler } = require("node-resque");
import { Scheduler, Worker } from "node-resque";
*/

let worker;
Expand Down