Code Monkey home page Code Monkey logo

e-commerce-website-example's Introduction

E-Commerce Website Example

This is a sample e-commerce website demonstrating the Axum web framework and Sqlx drivers, written in Rust. Comes with a frontend written in HTML, CSS, and vanilla Javascript.

This package is meant to be an example/reference for beginners on how they might implement a webserver API using Rust. It should thus not be used for any serious application as it was not built with practicality and security in mind.

Project Overview

The project aims to demonstrate the development of a full-stack web application using Rust for the backend and HTML, CSS, and JavaScript for the frontend. It leverages the Axum web framework in Rust to create a RESTful API and serves static HTML, CSS, and JavaScript files as the frontend interface.

Requirements

  • Rust (version 1.69.0+)
  • Cargo (Rust's package manager)
  • HTML5
  • CSS3
  • JavaScript (ES6+)

Getting Started

The project is fairly simple to get up and running, in fact, it boils down to only a couple of steps.

  1. Install Rust

You can install Rust by following the official guide

  1. Clone the repository
git clone https://github.com/Wolfus20/e-commerce-website.git
  1. Create a .env file with all the relevant fields

You can copy the .env.example file provided and the only field you have to manually enter is JWT_SECRET, which will be used by the JWT token encoded/decoder

  1. Run the project just like any other Rust project

Run the non-optimized, dev version:

cargo run

or the optimized verion:

cargo run --release

You'll know it's working when you see

Listening on 127.0.0.1:3000

Usage

The databases will be automatically created with the appropriate tables by the migrations upon startup.

Simply open your browser and enter in the url "http://127.0.0.1:3000/"

Resources

e-commerce-website-example's People

Contributors

tofuwaffles avatar

Stargazers

javad avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.