-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use multi-stage builds to exclude `devDependencies` from production image.
- Loading branch information
Showing
4 changed files
with
40 additions
and
10 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,7 @@ | ||
node_modules | ||
.git | ||
.DS_Store | ||
.gitignore | ||
Dockerfile | ||
.dockerignore | ||
.editorconfig |
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,23 @@ | ||
FROM node:alpine as builder | ||
|
||
WORKDIR /app | ||
|
||
COPY tsconfig.json . | ||
COPY package*.json ./ | ||
RUN npm ci --no-progress | ||
|
||
COPY src/ ./src/ | ||
|
||
RUN npm run build | ||
|
||
FROM node:alpine | ||
|
||
WORKDIR /app | ||
|
||
COPY package*.json ./ | ||
RUN npm ci --no-progress --only=production | ||
|
||
COPY --from=builder /app/dist/ ./dist/ | ||
|
||
EXPOSE 3000 | ||
CMD [ "npm", "start", "--silent" ] |
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 |
---|---|---|
@@ -1,12 +1,8 @@ | ||
# octoglots | ||
Find GitHub users based on the languages of repositories they own. | ||
|
||
To do: | ||
* Create a service which provides a single API endpoint to search for GitHub users by the programming language they use in their public repositories. | ||
* Each user returned in the response of the search request should at least contain the username, name, avatar url and number of followers. | ||
* Use the GitHub APIs (https://developer.github.com/v3/) to retrieve the information. | ||
* The service should be developed with Node.js. Feel free to use any libraries you find suitable for this task. | ||
* The service should be covered with tests you find suitable for this task. | ||
* Create a Dockerfile to run the service. | ||
* Please use Git for this project. After you finished, create a zip archive of the repository and send it via email. | ||
* The goal isn't to build a ready product, but rather to get an idea of your skills. Most people spent no longer than four hours. | ||
## TL;DR | ||
|
||
npm run docker:build | ||
npm run docker:start | ||
http 'localhost/users?lang=ocaml' |
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