Skip to content

Latest commit

 

History

History
89 lines (63 loc) · 3.52 KB

README.md

File metadata and controls

89 lines (63 loc) · 3.52 KB

Join our community Follow @geneziodev

MERN Typescript Getting Started

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 users
  • GET /users/:id - Get a user by id
  • POST /users - Create a new user
  • PATCH /users/:id - Update a user by id
  • DELETE /users/:id - Delete a user by id

Deploy

🚀 You can deploy your own version of the template to Genezio with one click:

Deploy to Genezio

Genezio CLI Commands

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

Learn more

To learn more about Genezio, take a look at the following resources:

Contact

If you need support, or you have any questions, please join us in our Discord channel. We'd love to chat!

Built With