Simple full-stack project using typescript
https://book-store-ts.herokuapp.com/
This is the directory structure for frontend
, it is created by create-react-app
with --template typescript
flag, which helps us to create react project.
client
├── build
├── public
├── src
│ ├── constants.ts
│ ├── index.tsx
│ ├── types.ts
│ └── state
├── package.json
└── tsconfig.json
backend
directory structure is as follows, and the necessary information is contained in each folder.
server
├── build
├── src
│ ├── app.ts
│ ├── index.ts
│ ├── types.ts
│ ├── models
│ ├── routes
│ └── utils
├── tests
├── jest.config.js
├── package.json
└── tsconfig.json
Before getting started, you need .env
file at server/build/src/
following the .env.template
file located in server
directory.
bash ./build.sh
After build project, you have to place .env
file in right position. Feel free to open a new issue if you’re having any problems.
This test code uses a jest to check the backend server API.
npm run test
bash ./run.sh
Author: juseongkr
Demo: https://book-store-ts.herokuapp.com/#/
Source Code: https://github.com/juseongkr/book-store
#reactjs #nodejs #react