this project was boostraped, bundled and structured by me.
github user: itays123.
This backend is a fully object-oriented backend, meaning you can change the database with just one line of code defining the service type in the utils/flowerController.ts
.
In order to create a new database service, create a new TypeScript class and implement the flowerDao
interface, located in utils/models/flowerDao.ts
.
You can use any database you want, as long as all methods in the interfaces are returning the right information.
After your service is ready, replace it with the current service defined in utils/flowerController.ts
. The controller will automatically fetch the information usiong your service, without having to change more than one line of code.
/
- The home page/about
- The about page/shop
- The main shopping page/shop/:id
- The item page
- The
FlowerContextProvider
is responsible for fetching shop items from the server. - The
FlowerList
component is responsible for displaying the flowers is a responsive structure, as a list of theFlower
component. - The
FlowerRoute
component is the individual route for each flower.
To bundle the app, run deno bundle client.tsx > public/app.js
To run the app, run deno run --allow-read --allow-net --allow-write --unstable server.tsx
Note: you must bundle the app first
feel free to open issues and suggest any improvments you have in mind:)