- Deno
- MongoDB
- Deno (> v1.1.0)
- Make
NAME | DESC |
---|---|
DB_URI | url to connect with Mongo database |
CLIENT_ID | PayU client_id |
CLIENT_SECRET | PayU client_secret |
MAIL_API_KEY | Sendgrid api_key |
Email authorized in sendgrid, will be used as author of emails |
In the project directory, you can run:
It runs the app in the development mode.
Open http://localhost:8080 to view it in the browser.
The page will reload if you make edits.
The database used is MongoDB.
It stores two collections:
- Products
interface Product {
name: string,
price: number,
image: string
}
- Checkouts (should be renamed to Orders)
interface Checkout {
type: string,
price: number,
status: string,
firstname: string,
lastname: string,
address: string,
postal: string,
email: string,
phone: number
}
The app is made in the server-side rendered approach.
The main file is 'mod.ts' - it setups the whole server and imports functional parts:
controllers
contains controllers that handle requests that matches router pathsmiddleware
contains server middlewares (functions that handle requests)models
contains interfaces used in the databasepublic
contains client-side resources like css or jsroutes
defines routing in the appservices
contains services like email, payu, product, checkout used by other componentsviews
contains server-side rendered views, uses Nunjucks as templating engine.
The project contains any custom css. Instead Tailwind framework is used to add styling.