Skip to content

Commit

Permalink
#38
Browse files Browse the repository at this point in the history
- examples/server: проведен рефакторинг
- examples/server: апи заменен на JSONPlaceholder
  • Loading branch information
krutoo committed Mar 20, 2023
1 parent 8fe1881 commit 5c421fc
Show file tree
Hide file tree
Showing 20 changed files with 358 additions and 434 deletions.
9 changes: 0 additions & 9 deletions examples/server/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,5 @@ module.exports = {
'jsdoc/require-jsdoc': 'off',
},
},

// allow use only typed-redux-saga/macro
{
files: ['./**/*.{ts,tsx}'],
rules: {
'@jambit/typed-redux-saga/use-typed-effects': ['error', 'macro'],
'@jambit/typed-redux-saga/delegate-effects': 'error',
},
},
],
};
66 changes: 28 additions & 38 deletions examples/server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions examples/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "NODE_ENV='development' webpack watch",
"start": "NODE_ENV='development' node ./dist/index.js",
"lint": "eslint --cache ./src --ext .js,.jsx,.ts,.tsx",
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx",
"type-check": "tsc -p . --noEmit"
},
"author": "www.sima-land.ru team",
Expand All @@ -16,7 +16,6 @@
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.21.0",
"@jambit/eslint-plugin-typed-redux-saga": "^0.4.0",
"@types/react": "^17.0.40",
"@types/react-dom": "^17.0.13",
"babel-loader": "^9.1.2",
Expand Down
32 changes: 32 additions & 0 deletions examples/server/src/app/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type { BaseConfig } from '@sima-land/isomorph/config';
import type { SauceResponse } from '@sima-land/isomorph/http-client/sauce';

export interface AppConfig extends BaseConfig {
httpPort: {
main: number;
metrics: number;
};
}

export interface SagaDeps {
api: HttpApi;
}

export interface HttpApi {
getUsers(): Promise<SauceResponse<User[]>>;
getPosts(): Promise<SauceResponse<Post[]>>;
}

export interface User {
id: number;
name: string;
username: string;
email: string;
}

export interface Post {
userId: number;
id: number;
title: string;
body: string;
}
33 changes: 0 additions & 33 deletions examples/server/src/components/desktop.module.css

This file was deleted.

43 changes: 0 additions & 43 deletions examples/server/src/components/desktop.tsx

This file was deleted.

78 changes: 0 additions & 78 deletions examples/server/src/di/app/desktop.tsx

This file was deleted.

Loading

0 comments on commit 5c421fc

Please sign in to comment.