Skip to content

Commit

Permalink
Rename index.js to api.js to make room for client.js
Browse files Browse the repository at this point in the history
  • Loading branch information
asbjornu committed Mar 24, 2019
1 parent 6312fc4 commit 7d8b481
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion index.js → api.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ const options = {
// https is necessary otherwise browsers will not
// be able to connect
const server = http2.createSecureServer(options);
server.on('stream', (stream, headers) => {

server.on('stream', (stream, headers, flags) => {
console.log(headers);

// stream is a Duplex
// headers is an object containing the request headers

Expand Down
4 changes: 2 additions & 2 deletions docker/api.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WORKDIR /app
COPY --from=cert *.pem /app/certs/
COPY package.json /app
RUN npm install
COPY . /app
COPY api.js /app
EXPOSE 8081

ENTRYPOINT ["node", "index.js"]
ENTRYPOINT ["node", "api.js"]

0 comments on commit 7d8b481

Please sign in to comment.