1.1.0 • Published 3 years ago

create-sls-app v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Serverless Starter

Build Status npm npm

This starter kit is designed to get you up and running with a bunch of awesome Serverless technologies.

The primary goal of this project is to provide a stable foundation upon which to build modern web applications. Its purpose is not to dictate your project structure or to demonstrate a complete real-world application, but to provide a set of tools intended to make front-end development robust and easy.

Quickstart

$ npx create-sls-app my-app
$ cd my-app
$ npm start

the generated project will vary in the presence of the following flags:

FlagWhat is it for?
--verboseprint additional logs.
--infoprint environment debug info.
--nodepswill no install dependencies on the generated project.
--use-npmwill use npm as command.
--inplaceapply setup to an existing project.
-a <alias>will setup webpack alias. app by default.
--typescriptadd TypeScript support.

(npx comes with npm 5.2+ and higher, see instructions for older npm versions)

Creating an app

You’ll need to have Node 8.10.0 or later on your local development machine (but it’s not required on the server). You can use fnm to easily switch Node versions between different projects.

To create a new app, you may choose one of the following methods:

npx

$ npx create-sls-app my-app

(npx comes with npm 5.2+ and higher, see instructions for older npm versions)

npm

$ npm init react-webpack-project my-app

npm init <initializer> is available in npm 6+

yarn

$ yarn create react-webpack-project my-app

yarn create is available in Yarn 0.25+

It will create a directory called my-app inside the current folder. Inside that directory, it will generate the initial project structure and install the transitive dependencies. See Project Structure.

Generated App

Running the App

After completing the previous steps, you're ready to start the project!

$ yarn start  # Start the development server (or `npm start`)

While developing, you will probably rely mostly on yarn start; however, there are additional scripts at your disposal:

yarn <script>Description
startServes your app
lintLints the project for potential errors
lint:fixLints the project and fixes all correctable errors

Project Structure

.