Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heismanish/course_selling_app-admin-dashboard
Admin side of a course selling app with a backend built entirely using Typescript.
https://github.com/heismanish/course_selling_app-admin-dashboard
full-stack mern-project typescript
Last synced: 30 days ago
JSON representation
Admin side of a course selling app with a backend built entirely using Typescript.
- Host: GitHub
- URL: https://github.com/heismanish/course_selling_app-admin-dashboard
- Owner: Heismanish
- Created: 2023-09-05T11:36:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-11T15:10:39.000Z (about 1 year ago)
- Last Synced: 2023-11-11T16:25:08.207Z (about 1 year ago)
- Topics: full-stack, mern-project, typescript
- Language: TypeScript
- Homepage:
- Size: 87.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Journey of JS to TS:
## In
1. Changing imports and exports from CJS to ES Modules.
2. Property 'authorization' does not exist on type 'Headers'.
=>```typescript
import { Request, Response, NextFunction } from "express";
```3. Property 'sendStatus' does not exist on type 'Response'.
=>
```typescript
import { Request, Response, NextFunction } from "express";
```5. Property 'authorization' does not exist on type 'Headers'.
=>
```typescript
import { Request, Response, NextFunction } from "express";
```6. Problem with id being a string `jwtAdminAuthentication`.
=>
```typescript
if (typeof user === "string") {
return res.sendStatus(403);
}
if (user) {
req.headers.user = user.id; // source
next();
}
```## In `admin.ts`
1. "Property 'user' does not exist on type 'Request>'" in router.get("/me")