What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-07 07:32:02
write test code javascript
// create directory // npm init -y // npm install tape // create a file example: filename.js // create a function in it and export as module.exports = functionName // create a test file example: filename.test.js // import the exported function as const ... Add solution -
Javascript 2021-09-29 02:33:09
simple node server
//to run : node filename.js const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => res.send('Hello World!')) app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`)) /... Add solution -
Other 2021-09-28 08:57:02
how to init npm
The npm init command is a step-by-step tool to scaffold out your project. It will prompt you for input for a few aspects of the project in the following order: The project's name, The project's initial version, The project's description, The project's ... Add solution -
Javascript 2021-09-23 01:45:03
create server and connect to db and frontend
// create directory //npm init -y //npm i express --save //npm i mysql --save //create public directory //create server.js // <---- In the server js file ---> 'use strict'; const express = require('express'); const app = express(); app.use(expre... Add solution -
Shell/Bash 2021-09-22 03:54:02
vite command
npm init @vitejs/app yarn create @vitejs/app Add solution -
Javascript 2021-09-16 21:10:02
express js basic example
//to run : node filename.js const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => res.send('Hello World!')) app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`)) /... Add solution