@astrojs/node
Advanced tools
Comparing version 0.1.0 to 0.1.1
# @astrojs/node | ||
## 0.1.1 | ||
### Patch Changes | ||
- [`815d62f1`](https://github.com/withastro/astro/commit/815d62f151a36fef7d09590d4962ca71bda61b32) Thanks [@FredKSchott](https://github.com/FredKSchott)! - no changes. | ||
## 0.1.0 | ||
@@ -7,3 +13,3 @@ | ||
- [`2bb6a06e`](https://github.com/withastro/astro/commit/2bb6a06ebb449aa3fec6414754c8a248ca4721ef) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Welcome to the Astro v1.0.0 Beta! Read the [official announcement](https://astro.build/blog/astro-1-beta-release/) for more details. | ||
- [#2979](https://github.com/withastro/astro/pull/2979) [`9d7a4b59`](https://github.com/withastro/astro/commit/9d7a4b59b53f8cb274266f5036d1cef841750252) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Welcome to the Astro v1.0.0 Beta! Read the [official announcement](https://astro.build/blog/astro-1-beta-release/) for more details. | ||
@@ -10,0 +16,0 @@ ## 0.0.2 |
{ | ||
"name": "@astrojs/node", | ||
"description": "Deploy your site to a Node.js server", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"type": "module", | ||
@@ -21,2 +21,6 @@ "types": "./dist/index.d.ts", | ||
}, | ||
"scripts": { | ||
"build": "astro-scripts build \"src/**/*.ts\" && tsc", | ||
"dev": "astro-scripts dev \"src/**/*.ts\"" | ||
}, | ||
"dependencies": { | ||
@@ -26,10 +30,5 @@ "@astrojs/webapi": "^0.11.0" | ||
"devDependencies": { | ||
"astro": "1.0.0-beta.6", | ||
"astro-scripts": "0.0.2" | ||
}, | ||
"scripts": { | ||
"build": "astro-scripts build \"src/**/*.ts\" && tsc", | ||
"dev": "astro-scripts dev \"src/**/*.ts\"" | ||
}, | ||
"readme": "# @astrojs/node\n\nAn experimental server-side rendering adapter for use with Node.js servers.\n\nIn your astro.config.mjs use:\n\n```js\nimport { defineConfig } from 'astro/config';\nimport nodejs from '@astrojs/node';\n\nexport default defineConfig({\n adapter: nodejs()\n})\n```\n\nAfter performing a build there will be a `dist/server/entry.mjs` module that works like a middleware function. You can use with any framework that supports the Node `request` and `response` objects. For example, with Express you can do:\n\n```js\nimport express from 'express';\nimport { handler as ssrHandler } from './dist/server/entry.mjs';\n\nconst app = express();\napp.use(ssrHandler);\n\napp.listen(8080);\n```\n\n# Using `http`\n\nThis adapter does not require you use Express and can work with even the `http` and `https` modules. The adapter does following the Expression convention of calling a function when either\n\n- A route is not found for the request.\n- There was an error rendering.\n\nYou can use these to implement your own 404 behavior like so:\n\n```js\nimport http from 'http';\nimport { handler as ssrHandler } from './dist/server/entry.mjs';\n\nhttp.createServer(function(req, res) {\n ssrHandler(req, res, err => {\n if(err) {\n res.writeHead(500);\n res.end(err.toString());\n } else {\n // Serve your static assets here maybe?\n // 404?\n res.writeHead(404);\n res.end();\n }\n });\n}).listen(8080);\n```\n" | ||
} | ||
"astro": "workspace:*", | ||
"astro-scripts": "workspace:*" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11230
11
1