Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marius-brt/oneside-js
OneSide is a pre-compiled dynamic website framework.
https://github.com/marius-brt/oneside-js
ejs http nodejs website
Last synced: 23 days ago
JSON representation
OneSide is a pre-compiled dynamic website framework.
- Host: GitHub
- URL: https://github.com/marius-brt/oneside-js
- Owner: Marius-brt
- License: apache-2.0
- Created: 2021-03-28T11:01:48.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-22T07:51:08.000Z (about 2 years ago)
- Last Synced: 2024-11-15T10:57:50.635Z (about 2 months ago)
- Topics: ejs, http, nodejs, website
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/oneside
- Size: 231 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
> Documentation on the [Github](https://github.com/Marius-brt/oneside-js/wiki)
OneSide is a web server that allows you to create pre-compiled dynamic website with NodeJs. With OneSide, you create the backend and the frontend of your application in a single project. OneSide uses EJS for pre-rendered pages.
[OneSide Cli](https://github.com/Marius-brt/OneSide-Cli) repo.
## Features
- 📨 Fast thanks to pre-compiled and cached pages
- ⚙️ Pre-rendered page with EJS
- 👍 Easy to use
- 🔁 Live server
- ✨ Coded in TypeScript# Quick start
Start by installing OneSide Cli on your computer. This package allows you to create a OneSide project easily and to create your website with the live server. This allows you to automatically refresh and restart your server when you modify it.
```bash
$ npm i --global oneside-cli
```Now create a new project. To start, open the folder where you want to create your project with your cmd (a new folder will be created in it). Then enter the following command to create your project.
```bash
$ oneside init my-project
```Then enter in your project folder and start the server using OneSide cli.
```bash
$ cd my-project
$ oneside start
```And that's it! You are ready to code!
![cli](img/cli.png)
# Usage
Example of a basic OneSide server.
```js
const oneside = require('oneside');
const app = oneside.init({
port: 5050,
});app.get('/', (req, res) => {
res
.ejs({
message: 'Hello world !',
})
.render('home');
});app.listen();
```
> If you like the project please start it on [Github](https://github.com/Marius-brt/oneside-js) ⭐. If you have an idea to improve OneSide or you find a bug please open an issue [here](https://github.com/Marius-brt/oneside-js/issues).