![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
express-control
Advanced tools
Simplified Express wrapper API for Node apps.
Typings included.
This a basic example of a Node app with Express control:
// main.ts
import { createApp } from "express-control"
async function main() {
const App = createApp()
App.start()
}
main()
By default, your app will run on port 8000. You can pass an object to
createApp
specifying the port you want to use:
createApp({ port: 3000 })
Controllers handle requests. Routes will be handlend according to how you define your controllers' methods:
// controllers/app.ts
import { RestController } from "express-control"
export default RestController({
async "get /"(req, res){
return "hello control"
}
async "get /hello"(req, res){
return {
message:"hello"
}
}
})
To use a controller, add it as a controller to your app:
// main.ts
import { createApp } from "express-control"
import AppController from "./controllers/app"
async function main() {
const App = createApp()
App.controller("/", AppController)
App.start()
}
main()
Now routes for /
will be handled by the AppController:
If a methd name is /hello
in that AppController, it will handle the route /hello
Methods support all the Express features and they should start with the method name they support
async "post /info"(req,res) {
status(500)
return "Error saving info"
}
They also support params
:
async "get /user/:id"(req,res) {
return {
id: req.params.id
}
}
If you want to customise the response, you can return a function instead of an object:
async "get /info"(req, res) {
return () => {
res.status(401).json({
error: "please login"
})
}
}
That's it!
Feel free to contribute :-)
I will include examples for integrations with different frameworks and libraries: Next.js, socket.io, etc.
FAQs
Simplified Express api for Node apps
The npm package express-control receives a total of 0 weekly downloads. As such, express-control popularity was classified as not popular.
We found that express-control demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.