Skip to content
Snippets Groups Projects
Commit 452d36de authored by Cedric Mertig's avatar Cedric Mertig :crab:
Browse files

Merge branch 'shellsort' into 'dev'

Init

See merge request !1
parents 1c80c3d4 7a972542
Branches dev
No related tags found
1 merge request!1Init
# Copied Node and Rust gitignores from https://github.com/github/gitignore/tree/main
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
.cache
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
# Generated by Cargo
# will have compiled files and executables
debug/
target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
# RustRover
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
Cargo.lock 0 → 100644
This diff is collapsed.
[package]
name = "api-athuna"
version = "0.1.0"
edition = "2021"
authors = [ "shellsort <cl.mertig@gmail.com>" ]
[package.metadata.release]
release = false
# https://github.com/rustwasm/wasm-pack/issues/1247
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
[lib]
crate-type = ["cdylib"]
[dependencies]
worker = { version="0.4.2" }
worker-macros = { version="0.4.2" }
console_error_panic_hook = { version = "0.1.1" }
chrono = "0.4.38"
......@@ -13,8 +13,6 @@ The __Athuna API__ is connects the Frontend (Creator and Blog) with the Database
**Programming Language:** [Rust](https://www.rust-lang.org/) ([Discord](https://discord.gg/TupCGMkD))
**Web Framework:** [Actix Web](https://actix.rs/) ([Discord](https://discord.gg/NWpN5mmg3x))
**ORM Framework:** [SeaORM](https://www.sea-ql.org/SeaORM/) ([Discord](https://discord.gg/uCPdDXzbdv))
**Deployment:** [Cloudflare Workers](https://workers.cloudflare.com/) ([Discord](https://discord.gg/cloudflaredev))
......@@ -25,11 +23,47 @@ We welcome contributors with open arms!
For easier communication, please [join our discord](https://discord.gg/Sf5NJDM5).
<!--
## Deployment
## Setup for Contributors
To get started with contributing to the Athuna Blog, follow these steps:
TODO
1. Install Node.js, npm and npx:
- Download and install Node.js from nodejs.org
- npm (Node Package Manager) is included with Node.js
- npx (Node Package Execute) is included with Node.js
- Download and install Rust (ideally using rustup):
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
2. Install Visual Studio Code:
- Download and install VS Code from code.visualstudio.com
3. Clone the repository:
```bash
git clone https://gitlab.com/athuna/blog-athuna.git
cd blog-athuna
```
4. Install dependencies:
```bash
npm install
```
5. Add compilation target:
```bash
rustup target add wasm32-unknown-unknown
```
6. Run the development server:
```bash
npx wrangler dev
```
7. Use the project:
- Navigate to http://localhost:8787 (or the port specified in the console)
<!--
## Documentation
TODO
......
This diff is collapsed.
This diff is collapsed.
{
"dependencies": {
"wrangler": "^3.90.0"
}
}
use worker::*;
use chrono::Utc;
fn ping(_req: Request, _ctx: RouteContext<()>) -> Result<Response> {
Response::ok(Utc::now().to_string())
}
const BASE_PATH: &str = concat!("/v", env!("CARGO_PKG_VERSION_MAJOR"));
#[event(fetch)]
async fn fetch(
req: Request,
env: Env,
_ctx: Context,
) -> Result<Response> {
console_error_panic_hook::set_once();
let router = Router::new();
router
.get(&(BASE_PATH.to_owned() + "/ping"), ping)
.run(req, env).await
}
name = "api-athuna"
main = "build/worker/shim.mjs"
compatibility_date = "2024-11-22"
[build]
command = "cargo install -q worker-build && worker-build --release"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment