Skip to content

Commit

Permalink
fix(example-todo-list): use latest cli code
Browse files Browse the repository at this point in the history
  • Loading branch information
nabdelgadir committed Jan 20, 2020
1 parent 78b5941 commit c9d6537
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 77 deletions.
5 changes: 5 additions & 0 deletions examples/todo-list/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
npm-debug.log
/dist
# Cache used by TypeScript's incremental build
*.tsbuildinfo
28 changes: 28 additions & 0 deletions examples/todo-list/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Check out https://hub.docker.com/_/node to select a new base image
FROM node:10-slim

# Set to a non-root built-in user `node`
USER node

# Create app directory (with user `node`)
RUN mkdir -p /home/node/app

WORKDIR /home/node/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY --chown=node package*.json ./

RUN npm install

# Bundle app source code
COPY --chown=node . .

RUN npm run build

# Bind to all network interfaces so that it can be mapped to the host OS
ENV HOST=0.0.0.0 PORT=3000

EXPOSE ${PORT}
CMD [ "node", "." ]
28 changes: 0 additions & 28 deletions examples/todo-list/src/datasources/geocoder.datasource.config.json

This file was deleted.

26 changes: 0 additions & 26 deletions examples/todo-list/src/datasources/geocoder.datasource.ts

This file was deleted.

1 change: 1 addition & 0 deletions examples/todo-list/src/models/todo-list-image.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class TodoListImage extends Entity {
@property({
type: 'number',
id: true,
generated: false,
})
id: number;

Expand Down
3 changes: 2 additions & 1 deletion examples/todo-list/src/models/todo-list.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class TodoList extends Entity {
@property({
type: 'number',
id: true,
generated: false,
})
id: number;

Expand All @@ -30,7 +31,7 @@ export class TodoList extends Entity {
color?: string;

@hasMany(() => Todo)
todos?: Todo[];
todos: Todo[];

@hasOne(() => TodoListImage)
image?: TodoListImage;
Expand Down
1 change: 1 addition & 0 deletions examples/todo-list/src/models/todo.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class Todo extends Entity {
@property({
type: 'number',
id: true,
generated: false,
})
id: number;

Expand Down
21 changes: 0 additions & 21 deletions examples/todo-list/src/services/geocoder.service.ts

This file was deleted.

1 change: 0 additions & 1 deletion examples/todo-list/src/services/index.ts

This file was deleted.

0 comments on commit c9d6537

Please sign in to comment.