Skip to content
Easily import your static websites into ZEIT's now platform
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
now_importer
now_importer_binary
now_importer_lambda
previews
ui
.gitignore
.nowignore
CODE_OF_CONDUCT.md
Cargo.lock
Cargo.toml
LICENSE.md
README.md
now.json

README.md

now-importer

Easily import your static websites into ZEIT's now platform.

This is a small project to import and deploy an existing static website into now.sh. There are three parts to this project

  1. A CLI to import an existing website
  2. A now lambda to do the work of downloading, configuring, uploading, and deploying the website
  3. A UIHook to allow others to install this onto their ZEIT account and have a UI to import their sites

Using

As of right now, the binary isn't pre-built for download. I may do that one day.

To use the integration, head over to the integration page.

Installing

After downloading the projct, you have a couple of paths forward, depenidng on what you want to run and/or contribute to.

Binary and/or Lambda

For these parts, you need rust and cargo. The easiest way is through rustup. After you have that installed, you can compile the project or check for any errors and warnings. The rust parts of this repo use cargo workspaces.

# compile everything
cargo build

# check for errors and warnings
cargo check

# run the binary
cargo run -p now_importer_binary -- --help

UI Hook

For this part, you will need node, npm, and now. There are many ways to install node and npm. A quick search on the internet should help you install them. To get now, download them from ZEIT's website.

For testing the UIHook, you'll also need to setup a mock integration on ZEIT's website. For the UI Hook URL use http://localhost:3000 and make the project private. Then, add the integration to your account and go to the integration page.

Once you have everything downloaded, you can download dependencies and start the project.

# install depdencies
cd ui
npm install

# start the development server
cd ..
now dev -p 3000

You can now refresh the integration page and you should see the local version of your UI Hook.

Contibuting

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

I would love to see issues and pull requests to make this a better tool that works for people other than myself!

This project only works with rust's 2018 edition. Thus, you must have version 1.31 or later. Once you have rust installed, you can then run cargo run to see it in action. This will download and compile all the dependencies in development mode.

License

You can’t perform that action at this time.