Fist, move to server
folder and place the Firebase configuration (serviceAccountKey.json
) file at the root of the project.
Also, you need to create an .env
file:
PORT = 5000
APP_ENV = DEV
API_KEY = "THE API KEY IS INSIDE firebaseConfig.js"
You can use npm
or yarn
Installation:
``yarn`
To Run Test Suite:
yarn test
To Run using ts-node-dev
yarn dev
To Build the js files:
yarn build
To Run the Server
yarn start
Server default address:
localhost:5000
GET: api/orders
Return all orders
Heder: Authentication (Bearer Token)
POST api/orders
Add new order
Heder: Authentication (Bearer Token)
Body:
{
"title": "Test Order Aoba7",
"bookingDate": 1554284950000,
"customer": {
"phone": "015252098067",
"name": "Emad Alam",
"email": "[email protected]"
},
"address": {
"street": "Wriezener Str. 12",
"country": "Germany",
"zip": "13055",
"city": "Berlin"
}
}
PUT api/orders/:uid
Update Order
Heder: Authentication (Bearer Token)
Body:
{
"title": "Test Order Aoba7",
"bookingDate": 1554284950000
}
POST api/dev-token
Return an Token (It was created only for development propose. Only works in "DEV" environment);
{
"userId": "CA1zjKyaK5O6bqOBbxgqdaYAQRD3"
}
IMPORTANT: First need to create a .env file with serviceAccountKey.json from firebase config
# To avoid message conflic with storybook
SKIP_PREFLIGHT_CHECK=true
#Firebase config
REACT_APP_APIKEY=
REACT_APP_AUTH_DOMAIN=
REACT_APP_DATABASE_URL=
REACT_APP_PROJECTID=
REACT_APP_STORAGEBUCKET=
REACT_APP_MESSAGING_SENDER_ID=
REACT_APP_APP_ID=
Installation:
``yarn`
To Run Test Suite:
yarn test
To build:
yarn build
To run the Server
yarn start
To run the Storybook
yarn sorybook
Server default address:
localhost:3000
- NPM
- Typescript
- Git
- Jest
- Firebase
- Faker
- Express
- Supertest
- Husky
- Lint Staged
- Eslint
- Ts-Node-dev
- React
- Redux Toolkit
- Storybook
- React Testing Library
- Tailwind
- Material UI
- craco
- module-alias
- Figrma (UI)
- Trello (Kanban Board)