Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
update homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
nahtnam committed Aug 27, 2019
1 parent 6594b7f commit 6a16576
Showing 1 changed file with 27 additions and 24 deletions.
51 changes: 27 additions & 24 deletions website/src/pages/index.jsx
Expand Up @@ -14,23 +14,23 @@ export default class Index extends React.Component {
deployments: [
{
name: 'ZEIT Now',
code: 'process.env.LIGHT_ENVIRONMENT = \'now\';',
code: 'process.env.LIGHT_ENV = \'now\';',
},
{
name: 'RunKit',
code: 'process.env.LIGHT_ENVIRONMENT = \'runkit\';',
code: 'process.env.LIGHT_ENV = \'runkit\';',
},
{
name: 'AWS',
code: 'process.env.LIGHT_ENVIRONMENT = \'aws\';',
code: 'process.env.LIGHT_ENV = \'aws\';',
},
{
name: 'Google Cloud',
code: 'process.env.LIGHT_ENVIRONMENT = \'gcloud\';',
code: 'process.env.LIGHT_ENV = \'gcloud\';',
},
{
name: 'Netlify',
code: 'process.env.LIGHT_ENVIRONMENT = \'netlify\';',
code: 'process.env.LIGHT_ENV = \'netlify\';',
},
{
name: 'Server',
Expand Down Expand Up @@ -133,16 +133,17 @@ export default class Index extends React.Component {
</div>
</div>
<div className="w-full md:w-1/2 shadow-xl text-center m-4 md:m-0 rounded overflow-x-auto">
<CodeBlock language="javascript" value={`const light = require('light');
<CodeBlock language="javascript" value={`const { light, Route } = require('light');
module.exports = light({
path: '/',
async handler(req, res) {
class Index extends Route {
async handler() {
return {
hello: 'world',
};
},
});`} />
}
}
module.exports = light(Index);`} />
</div>
</div>
</div>
Expand Down Expand Up @@ -199,36 +200,38 @@ module.exports = light({
<span className="flex-1" />
</div>
<div className="w-full md:w-1/2 shadow-xl text-center m-4 md:m-0 rounded overflow-x-auto">
<CodeBlock language="javascript" value={`const light = require('light');
<CodeBlock language="javascript" value={`const { light, Route } = require('light');
${selectedDeploy.code ? `${selectedDeploy.code}` : ''}
module.exports = light({
path: '/',
async handler(req, res) {
class Index extends Route {
async handler() {
return {
hello: 'world',
};
},
});`} />
}
}
module.exports = light(Index);`} />
</div>
</div>
</div>
<div className="pt-12 md:block md:m-0 hidden">
<div className="container mx-auto flex-col-reverse md:flex-row flex-wrap md:flex">
<div className="w-full md:w-2/3 text-center px-2 m-4 md:m-0">
<Embed source={ `const light = require('light');
<Embed source={ `const { light, Route } = require('light');
process.env.LIGHT_ENVIRONMENT = 'runkit';
process.env.LIGHT_ENV = 'runkit';
module.exports = light({
path: '/',
async handler(req, res) {
class Index extends Route {
async handler() {
return {
hello: 'world',
};
},
});` } mode='endpoint' />
}
}
module.exports = light(Index);` } mode='endpoint' />
</div>
<div className="flex flex-col w-full md:w-1/3 text-center p-4 pb-0">
<span className="flex-1" />
Expand Down

0 comments on commit 6a16576

Please sign in to comment.