This is a starter template for building a full-stack web application with Express Typescript and MongoDB on the backend and React on the frontend. The template is set up to be deployed to Genezio, a platform for building and deploying full-stack web applications.
This template includes:
- Mongoose ORM for Mongo
- A crud example with a
User
model - A simple React frontend that uses the backend API for create a new user, view all users, edit a user and delete a user.
Routes and the logic for handling requests are defined in the ./src/routes
folder. The ./src/models
folder contains the
Mongoose models for the database.
The ./src/config.ts
file contains the configuration for the database connection.
Routes:
GET /users
- Get all usersGET /users/:id
- Get a user by idPOST /users
- Create a new userPATCH /users/:id
- Update a user by idDELETE /users/:id
- Delete a user by id
🚀 You can deploy your own version of the template to Genezio with one click:
Genezio also provides a CLI tool that you can use to deploy your project from your machine. All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install -g genezio |
Installs genezio globally |
genezio login |
Logs in to genezio |
genezio local |
Starts a local server |
genezio deploy |
Deploys a production project |
genezio --help |
Get help using genezio |
To learn more about Genezio, take a look at the following resources:
If you need support, or you have any questions, please join us in our Discord channel. We'd love to chat!