Skip to content

Commit

Permalink
Express.JS project v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Antonyák authored and ViolanteCodes committed Mar 22, 2022
0 parents commit 167467d
Show file tree
Hide file tree
Showing 53 changed files with 12,009 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": ["airbnb-base", "prettier"],
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
"prettier/prettier": "off",
"prefer-destructuring": "off",
"no-unused-expressions": "off",
"import/extensions":"off"
},
"plugins": ["ejs","prettier"]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
.env
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"emmet.includeLanguages": {
"ejs": "html"
},
"[html]": {
"editor.defaultFormatter": "j69.ejs-beautify"
},
"editor.formatOnSave": true
}
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
![recommended node version](https://img.shields.io/badge/node-v16-green)

# ExpressJS + ButterCMS Starter Project

This ExpressJS starter project fully integrates with dynamic sample content from your ButterCMS account, including main menu, pages, blog posts, categories, and tags, all with a beautiful, custom theme with already-implemented search functionality. All of the included sample content is automatically created in your account dashboard when you sign up for a free trial of ButterCMS.

[View our live demo hosted at Vercel](https://expressjs-starter-buttercms.vercel.app/), or you can click a button below to deploy your own copy of our starter project to the provider of your choice.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FButterCMS%2Fexpressjs-starter-buttercms&env=EXPRESSJS_BUTTER_CMS_API_KEY&envDescription=Your%20ButterCMS%20API%20Token&envLink=https%3A%2F%2Fbuttercms.com%2Fsettings%2F&project-name=expressjs-starter-buttercms&repo-name=expressjs-starter-buttercms&redirect-url=https%3A%2F%2Fbuttercms.com%2Fonboarding%2Fvercel-starter-deploy-callback%2F&production-deploy-hook=Deploy%20Triggered%20from%20ButterCMS&demo-title=ButterCMS%20Express%20Starter&demo-description=Fully%20integrated%20with%20your%20ButterCMS%20account&demo-url=https%3A%2F%2Fexpressjs-starter-buttercms.vercel.app%2F&demo-image=https://cdn.buttercms.com/r0tGK8xFRti2iRKBJ0eY&repository-name=expressjs-starter-buttercms)

[![Deploy with Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/ButterCMS/expressjs-starter-buttercms&env%5BEXPRESS_BUTTER_CMS_API_KEY%5D=check%20https://buttercms.com/settings)


## 1. Installation

First, clone the repo and install the dependencies by running `npm install`

```bash
git clone https://github.com/ButterCMS/expressjs-starter-buttercms.git
cd expressjs-starter-buttercms
npm install
```

### 2. Set API Token

To fetch your ButterCMS content, add your API token as an environment variable.

```bash
$ echo 'EXPRESS_BUTTER_CMS_API_KEY=<Your API Token>' >> .env
```

### 3. Run local server

To view the app in the browser, you'll need to run the local development server:

```bash
$ npm run dev
```

Congratulations! Your starter project is now live. To view your project, point your browser to http://localhost:3000/.

## 4. Deploy on Vercel

Deploy your Express JS app using Vercel, the creators of Next.js, or with Heroku. With the click of a button, you'll create a copy of your starter project in your Git provider account, instantly deploy it, and institute a full content workflow connected to your ButterCMS account. Smooth.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FButterCMS%2Fexpressjs-starter-buttercms&env=EXPRESS_BUTTER_CMS_API_KEY&envDescription=Your%20ButterCMS%20API%20Token&envLink=https%3A%2F%2Fbuttercms.com%2Fsettings%2F&project-name=expressjs-starter-buttercms&repo-name=expressjs-starter-buttercms&redirect-url=https%3A%2F%2Fbuttercms.com%2Fonboarding%2Fvercel-starter-deploy-callback%2F&production-deploy-hook=Deploy%20Triggered%20from%20ButterCMS&demo-title=ButterCMS%20Expressjs%20Starter&demo-description=Fully%20integrated%20with%20your%20ButterCMS%20account&demo-url=https%3A%2F%2Fexpressjs-starter-buttercms.vercel.app%2F&demo-image=https://cdn.buttercms.com/r0tGK8xFRti2iRKBJ0eY&repository-name=expressjs-starter-buttercms)

[![Deploy with Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/ButterCMS/expressjs-starter-buttercms&env%5BEXPRESS_BUTTER_CMS_API_KEY%5D=check%20https://buttercms.com/settings)

### 5. Webhooks

The ButterCMS webhook settings are located at https://buttercms.com/webhooks/
### 6. Previewing Draft Changes

By default, your starter project is set up to allow previewing of draft changes saved in your ButterCMS.com account. To disable this functionality, set the following value in your .env file: EXPRESS_BUTTER_CMS_PREVIEW=false
23 changes: 23 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "ButterCMS ExpressJS Starter Project ",
"description": "Drop-in proof-of-concept Express.js app, fully integrated with your ButterCMS account.",
"repository": "https://github.com/ButterCMS/expressjs-starter-buttercms",
"logo": "https://cdn.buttercms.com/R3fbtvoRT2CqEQSmk8hb",
"keywords": [
"Express.js",
"buttercms",
"cms",
"blog"
],
"buildpacks": [
{
"url": "heroku/nodejs"
}
],
"env": {
"EXPRESS_BUTTER_CMS_API_KEY": {
"description": "The API token of your ButterCMS account",
"value": ""
}
}
}
6 changes: 6 additions & 0 deletions assets/css/bootstrap.min.css

Large diffs are not rendered by default.

Binary file added assets/css/fonts/.DS_Store
Binary file not shown.
Binary file added assets/css/fonts/LineIcons.eot
Binary file not shown.
1,616 changes: 1,616 additions & 0 deletions assets/css/fonts/LineIcons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/css/fonts/LineIcons.ttf
Binary file not shown.
Binary file added assets/css/fonts/LineIcons.woff
Binary file not shown.
Binary file added assets/css/fonts/LineIcons.woff2
Binary file not shown.
211 changes: 211 additions & 0 deletions assets/css/lineicons.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
/*--------------------------------
*** NOTE: This is not the entire original line icons css file. This is a
truncated version that only contains the icons used in the ButterCMS starter
project. If you wish to use other icons, please replace this file.***
LineIcons Web Font
Author: lineicons.com
-------------------------------- */
@font-face {
font-family: 'LineIcons';
src: url('fonts/LineIcons.eot');
src: url('fonts/LineIcons.eot') format('embedded-opentype'), url('fonts/LineIcons.woff2') format('woff2'), url('fonts/LineIcons.woff') format('woff'), url('fonts/LineIcons.ttf') format('truetype'), url('fonts/LineIcons.svg') format('svg');
font-weight: normal;
font-style: normal;
}
/*------------------------
base class definition
-------------------------*/
.lni {
display: inline-block;
font: normal normal normal 1em/1 'LineIcons';
color: inherit;
flex-shrink: 0;
speak: none;
text-transform: none;
line-height: 1;
vertical-align: -.125em;
/* Better Font Rendering */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/*------------------------
change icon size
-------------------------*/
/* relative units */
.lni-sm {
font-size: 0.8em;
}
.lni-lg {
font-size: 1.2em;
}
/* absolute units */
.lni-16 {
font-size: 16px;
}
.lni-32 {
font-size: 32px;
}

/*------------------------
spinning icons
-------------------------*/
.lni-is-spinning {
animation: lni-spin 1s infinite linear;
}
@keyframes lni-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/*------------------------
rotated/flipped icons
-------------------------*/
.lni-rotate-90 {
transform: rotate(90deg);
}
.lni-rotate-180 {
transform: rotate(180deg);
}
.lni-rotate-270 {
transform: rotate(270deg);
}
.lni-flip-y {
transform: scaleY(-1);
}
.lni-flip-x {
transform: scaleX(-1);
}
/*------------------------
icons
-------------------------*/

.lni-calendar::before {
content: "\ea4e";
}


.lni-chevron-down-circle::before {
content: "\ea5d";
}

.lni-chevron-down::before {
content: "\ea5e";
}

.lni-chevron-left-circle::before {
content: "\ea5f";
}

.lni-chevron-left::before {
content: "\ea60";
}

.lni-chevron-right-circle::before {
content: "\ea61";
}

.lni-chevron-right::before {
content: "\ea62";
}

.lni-chevron-up-circle::before {
content: "\ea63";
}

.lni-chevron-up::before {
content: "\ea64";
}

.lni-compass::before {
content: "\ea7d";
}

.lni-display-alt::before {
content: "\ea9d";
}

.lni-display::before {
content: "\ea9e";
}

.lni-facebook-filled::before {
content: "\eab5";
}

.lni-facebook-original::before {
content: "\eab7";
}

.lni-facebook-oval::before {
content: "\eab8";
}

.lni-facebook::before {
content: "\eab9";
}

.lni-grid-alt::before {
content: "\eada";
}

.lni-grid::before {
content: "\eadb";
}

.lni-instagram-filled::before {
content: "\eaf8";
}

.lni-instagram-original::before {
content: "\eaf9";
}

.lni-instagram::before {
content: "\eafa";
}

.lni-layers::before {
content: "\eb0d";
}

.lni-linkedin-original::before {
content: "\eb1b";
}

.lni-linkedin::before {
content: "\eb1c";
}

.lni-quotation::before {
content: "\eb6e";
}

.lni-search-alt::before {
content: "\eb85";
}

.lni-search::before {
content: "\eb86";
}

.lni-tag::before {
content: "\ebc5";
}

.lni-twitter-filled::before {
content: "\ebe8";
}

.lni-twitter-original::before {
content: "\ebe9";
}

.lni-twitter::before {
content: "\ebea";
}
Loading

1 comment on commit 167467d

@vercel
Copy link

@vercel vercel bot commented on 167467d Mar 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.