Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Aca.ts is a CLI based on Typescript and Knex.js. It can automatically sync database schema, automatically generate APIs for accessing the database, automatically create frontend APIs through backend functions (like RPC).
English | 简体中文
Aca.ts is a node.js CLI based on Typescript and Knex.js. It can automatically sync database schema according to a custom ORM. It can also automatically generate APIs for accessing the database. More importantly, it can automatically create frontend APIs through backend functions and the generated database APIs (like RPC) and can run on node.js runtime, so frontend developers can easily access the backend without defining routing. The APIs are typescript, and therefore the tips are very friendly when coding.
Use the class syntax of Typescript to define ORM:
example-blog.ts
namespace db {
export class user {
id: id
@$_.unique name: string
age?: int
married = false
profile?: profile
posts: post[]
}
export class profile {
id: id
password: string
@$_.foreign('userId') user: user
}
export class post {
id: id
content: string
score: float
@$_.foreign('userId') user: user
categories: category[]
}
export class category {
id: id
name: string
@$_.foreign('categoryId') parent?: category
children: category[]
posts: post[]
}
}
npm install -g aca.ts
$ aca create <projectName> & cd <projectName>
Create a backend app (a simple koa framework):
$ aca server
Create a frontend app (a react app with create-react-app):
$ aca client
Add self built app to the project:
$ aca add <appName> --server --client --apiDir <path>
path default: src/aca.server src/aca.client
$ aca up
Then the database, frontend (if necessary), and backend are all set up, you can start your project now. Happy coding!
The generated backend APIs usage example are as follows:
The generated frontend APIs usage example are as follows:
FAQs
Aca.ts is a full stack development tool without backend development, which can automatically synchronize database schema and generate database query APIs according to a typescript ORM document; Automatically generate the client access server APIs accordin
The npm package aca.ts receives a total of 4 weekly downloads. As such, aca.ts popularity was classified as not popular.
We found that aca.ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.